[FFmpeg-cvslog] rv10: stop using deprecated avcodec_set_dimensions

Anton Khirnov git at videolan.org
Fri Nov 1 15:42:12 CET 2013


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

rv10: stop using deprecated avcodec_set_dimensions

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

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

diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index f790c1f..f80625a 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -28,6 +28,7 @@
 #include "libavutil/imgutils.h"
 #include "avcodec.h"
 #include "error_resilience.h"
+#include "internal.h"
 #include "mpegvideo.h"
 #include "mpeg4video.h"
 #include "h263.h"
@@ -358,10 +359,12 @@ static int rv20_decode_picture_header(RVDecContext *rv)
         if (new_w != s->width || new_h != s->height) {
             av_log(s->avctx, AV_LOG_DEBUG,
                    "attempting to change resolution to %dx%d\n", new_w, new_h);
-            if (av_image_check_size(new_w, new_h, 0, s->avctx) < 0)
-                return AVERROR_INVALIDDATA;
             ff_MPV_common_end(s);
-            avcodec_set_dimensions(s->avctx, new_w, new_h);
+
+            ret = ff_set_dimensions(s->avctx, new_w, new_h);
+            if (ret < 0)
+                return ret;
+
             s->width  = new_w;
             s->height = new_h;
             if ((ret = ff_MPV_common_init(s)) < 0)



More information about the ffmpeg-cvslog mailing list