[FFmpeg-cvslog] h26[13]dec: stop using deprecated avcodec_set_dimensions

Anton Khirnov git at videolan.org
Fri Nov 1 15:00:49 CET 2013


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

h26[13]dec: stop using deprecated avcodec_set_dimensions

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

 libavcodec/h261dec.c |    5 ++++-
 libavcodec/h263dec.c |    4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 479da77..4842fa0 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -29,6 +29,7 @@
 #include "mpegvideo.h"
 #include "h263.h"
 #include "h261.h"
+#include "internal.h"
 
 #define H261_MBA_VLC_BITS 9
 #define H261_MTYPE_VLC_BITS 6
@@ -607,7 +608,9 @@ retry:
         s->parse_context = pc;
     }
     if (!s->context_initialized) {
-        avcodec_set_dimensions(avctx, s->width, s->height);
+        ret = ff_set_dimensions(avctx, s->width, s->height);
+        if (ret < 0)
+            return ret;
 
         goto retry;
     }
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 8060d8f..c52fc00 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -600,7 +600,9 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         /* H.263 could change picture size any time */
         s->context_reinit = 0;
 
-        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_MPV_common_frame_size_change(s)))
             return ret;



More information about the ffmpeg-cvslog mailing list