[FFmpeg-cvslog] libopenjpegdec: stop using deprecated avcodec_set_dimensions
Anton Khirnov
git at videolan.org
Fri Nov 1 15:13:53 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Oct 27 10:02:26 2013 +0100| [967cd6fafbf2fdec9cbe011296ad34a70212427e] | committer: Anton Khirnov
libopenjpegdec: stop using deprecated avcodec_set_dimensions
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=967cd6fafbf2fdec9cbe011296ad34a70212427e
---
libavcodec/libopenjpegdec.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index 0062701..d6fca33 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -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))
More information about the ffmpeg-cvslog
mailing list