[FFmpeg-cvslog] pictordec: stop using deprecated avcodec_set_dimensions

Anton Khirnov git at videolan.org
Fri Nov 1 15:33:44 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Oct 27 10:02:26 2013 +0100| [0f21d8b1b40848973558c737aebe800c46e93a3d] | committer: Anton Khirnov

pictordec: stop using deprecated avcodec_set_dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f21d8b1b40848973558c737aebe800c46e93a3d
---

 libavcodec/pictordec.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 2d72977..33c4545 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -141,9 +141,9 @@ static int decode_frame(AVCodecContext *avctx,
     avctx->pix_fmt = AV_PIX_FMT_PAL8;
 
     if (s->width != avctx->width && s->height != avctx->height) {
-        if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
-            return -1;
-        avcodec_set_dimensions(avctx, s->width, s->height);
+        ret = ff_set_dimensions(avctx, s->width, s->height);
+        if (ret < 0)
+            return ret;
     }
 
     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {



More information about the ffmpeg-cvslog mailing list