]> git.sesse.net Git - ffmpeg/commitdiff
h26[13]dec: stop using deprecated avcodec_set_dimensions
authorAnton Khirnov <anton@khirnov.net>
Sun, 27 Oct 2013 09:02:26 +0000 (10:02 +0100)
committerAnton Khirnov <anton@khirnov.net>
Thu, 31 Oct 2013 19:14:15 +0000 (20:14 +0100)
libavcodec/h261dec.c
libavcodec/h263dec.c

index 479da779581cd4484da95f326882537f6785270f..4842fa0dd35f6d97969afd48d50c1903b3aeacb4 100644 (file)
@@ -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;
     }
index 8060d8f28431742fb3c0336e007de5befe936be5..c52fc00515a8550d04bc872428aa7ec98ff67f1d 100644 (file)
@@ -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;