[FFmpeg-cvslog] avcodec/sanm: stop using deprecated avcodec_set_dimensions()

Paul B Mahol git at videolan.org
Fri Nov 1 20:06:18 CET 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Nov  1 15:26:38 2013 +0000| [01507ab3699222f5a1be58625e916c173f1be0da] | committer: Paul B Mahol

avcodec/sanm: stop using deprecated avcodec_set_dimensions()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavcodec/sanm.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index 76da8bb..a6c1c01 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -738,11 +738,10 @@ static int process_frame_obj(SANMVideoContext *ctx)
     }
 
     if (ctx->width < left + w || ctx->height < top + h) {
-        if (av_image_check_size(FFMAX(left + w, ctx->width),
-                                FFMAX(top  + h, ctx->height), 0, ctx->avctx) < 0)
-            return AVERROR_INVALIDDATA;
-        avcodec_set_dimensions(ctx->avctx, FFMAX(left + w, ctx->width),
-                                           FFMAX(top  + h, ctx->height));
+        int ret = ff_set_dimensions(ctx->avctx, FFMAX(left + w, ctx->width),
+                                                FFMAX(top  + h, ctx->height));
+        if (ret < 0)
+            return ret;
         init_sizes(ctx, FFMAX(left + w, ctx->width),
                         FFMAX(top  + h, ctx->height));
         if (init_buffers(ctx)) {



More information about the ffmpeg-cvslog mailing list