]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eatgv.c
Merge commit '16381923fb7b9087ce559fb1cd3594469ac6788b'
[ffmpeg] / libavcodec / eatgv.c
index bfdfb76b9bdc3efe48389775dbf9bac70938684b..6664cdb0f4cf7826bd9c509d528e7506769a4e34 100644 (file)
@@ -281,9 +281,10 @@ static int tgv_decode_frame(AVCodecContext *avctx,
         s->width  = AV_RL16(&buf[0]);
         s->height = AV_RL16(&buf[2]);
         if (s->avctx->width != s->width || s->avctx->height != s->height) {
-            avcodec_set_dimensions(s->avctx, s->width, s->height);
             av_freep(&s->frame_buffer);
             av_frame_unref(&s->last_frame);
+            if ((ret = ff_set_dimensions(s->avctx, s->width, s->height)) < 0)
+                return ret;
         }
 
         pal_count = AV_RL16(&buf[6]);
@@ -294,9 +295,6 @@ static int tgv_decode_frame(AVCodecContext *avctx,
         }
     }
 
-    if ((ret = av_image_check_size(s->width, s->height, 0, avctx)) < 0)
-        return ret;
-
     if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
         return ret;