[FFmpeg-cvslog] ansi: stop using deprecated avcodec_set_dimensions

Anton Khirnov git at videolan.org
Fri Nov 1 13:39:09 CET 2013


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

ansi: stop using deprecated avcodec_set_dimensions

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

 libavcodec/ansi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index ae67f3c..3f30ae9 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -89,7 +89,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     s->bg          = DEFAULT_BG_COLOR;
 
     if (!avctx->width || !avctx->height)
-        avcodec_set_dimensions(avctx, 80<<3, 25<<4);
+        ff_set_dimensions(avctx, 80 << 3, 25 << 4);
 
     return 0;
 }
@@ -226,7 +226,9 @@ static int execute_code(AVCodecContext * avctx, int c)
         }
         if (width != avctx->width || height != avctx->height) {
             av_frame_unref(s->frame);
-            avcodec_set_dimensions(avctx, width, height);
+            ret = ff_set_dimensions(avctx, width, height);
+            if (ret < 0)
+                return ret;
             ret = ff_get_buffer(avctx, s->frame, AV_GET_BUFFER_FLAG_REF);
             if (ret < 0) {
                 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");



More information about the ffmpeg-cvslog mailing list