]> git.sesse.net Git - ffmpeg/commitdiff
libopenjpegdec: stop using deprecated avcodec_set_dimensions
authorAnton Khirnov <anton@khirnov.net>
Sun, 27 Oct 2013 09:02:26 +0000 (10:02 +0100)
committerAnton Khirnov <anton@khirnov.net>
Thu, 31 Oct 2013 19:14:15 +0000 (20:14 +0100)
libavcodec/libopenjpegdec.c

index 006270108ddef5847eca93df44a972a1e7be5af7..d6fca33a8570583a69660af869ffccb0eb898b92 100644 (file)
@@ -33,6 +33,7 @@
 #include "libavutil/pixfmt.h"
 #include "libavutil/opt.h"
 #include "avcodec.h"
+#include "internal.h"
 #include "thread.h"
 
 #define JP2_SIG_TYPE    0x6A502020
@@ -315,13 +316,9 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
         height = (height + (1 << ctx->lowres) - 1) >> ctx->lowres;
     }
 
-    if ((ret = av_image_check_size(width, height, 0, avctx)) < 0) {
-        av_log(avctx, AV_LOG_ERROR,
-               "%dx%d dimension invalid.\n", width, height);
+    ret = ff_set_dimensions(avctx, width, height);
+    if (ret < 0)
         goto done;
-    }
-
-    avcodec_set_dimensions(avctx, width, height);
 
     if (avctx->pix_fmt != AV_PIX_FMT_NONE)
         if (!libopenjpeg_matches_pix_fmt(image, avctx->pix_fmt))