[FFmpeg-cvslog] libvpxdec: stop using deprecated avcodec_set_dimensions

Anton Khirnov git at videolan.org
Fri Nov 1 15:21:24 CET 2013


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

libvpxdec: stop using deprecated avcodec_set_dimensions

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

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

diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index d19dd6f..d65f7f9 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -90,9 +90,9 @@ static int vp8_decode(AVCodecContext *avctx,
         if ((int) img->d_w != avctx->width || (int) img->d_h != avctx->height) {
             av_log(avctx, AV_LOG_INFO, "dimension change! %dx%d -> %dx%d\n",
                    avctx->width, avctx->height, img->d_w, img->d_h);
-            if (av_image_check_size(img->d_w, img->d_h, 0, avctx))
-                return AVERROR_INVALIDDATA;
-            avcodec_set_dimensions(avctx, img->d_w, img->d_h);
+            ret = ff_set_dimensions(avctx, img->d_w, img->d_h);
+            if (ret < 0)
+                return ret;
         }
         if ((ret = ff_get_buffer(avctx, picture, 0)) < 0)
             return ret;



More information about the ffmpeg-cvslog mailing list