]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pictordec.c
cbs_h264: Add utility functions to insert/delete SEI messages
[ffmpeg] / libavcodec / pictordec.c
index 2d729778978989885833063228f2cc4d5e31960c..49547cf310697b8d8c3057db83ec332ba9dd2149 100644 (file)
@@ -140,10 +140,10 @@ static int decode_frame(AVCodecContext *avctx,
 
     avctx->pix_fmt = AV_PIX_FMT_PAL8;
 
-    if (s->width != avctx->width && s->height != avctx->height) {
-        if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
-            return -1;
-        avcodec_set_dimensions(avctx, s->width, s->height);
+    if (s->width != avctx->width || s->height != avctx->height) {
+        ret = ff_set_dimensions(avctx, s->width, s->height);
+        if (ret < 0)
+            return ret;
     }
 
     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
@@ -249,5 +249,5 @@ AVCodec ff_pictor_decoder = {
     .id             = AV_CODEC_ID_PICTOR,
     .priv_data_size = sizeof(PicContext),
     .decode         = decode_frame,
-    .capabilities   = CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1,
 };