]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/txd.c
Merge commit 'cffecc0e7ebd642afaa1fb9f56fab1fcc283293c'
[ffmpeg] / libavcodec / txd.c
index 7526f1377cab423cb5696cb904c9052eac1665ef..ad1a0152f4468e7a6e0e39ae9ea3c42335702a97 100644 (file)
@@ -63,10 +63,9 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         return AVERROR_PATCHWELCOME;
     }
 
-    if ((ret = av_image_check_size(w, h, 0, avctx)) < 0)
+    if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
         return ret;
-    if (w != avctx->width || h != avctx->height)
-        avcodec_set_dimensions(avctx, w, h);
+
     if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
         return ret;