]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/txd.c
wmalosslessdec: fix mclms_coeffs* array size
[ffmpeg] / libavcodec / txd.c
index 0eca07f76c4031e4178cb41a8edc15c81f767246..8f12291c85cdbd7f4e7c4f1c725fb6bf60042a85 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) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;