]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mvcdec: stop using deprecated avcodec_set_dimensions()
authorPaul B Mahol <onemda@gmail.com>
Fri, 1 Nov 2013 19:03:32 +0000 (19:03 +0000)
committerPaul B Mahol <onemda@gmail.com>
Fri, 1 Nov 2013 19:05:35 +0000 (19:05 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/mvcdec.c

index 423c7c43dcb97789f4f686b9152d7f4bd9f5daea..2cc7735cfbe2a2e9f420236c454e3323b738cef6 100644 (file)
@@ -39,6 +39,7 @@ static av_cold int mvc_decode_init(AVCodecContext *avctx)
     MvcContext *s = avctx->priv_data;
     int width  = avctx->width;
     int height = avctx->height;
+    int ret;
 
     if (avctx->codec_id == AV_CODEC_ID_MVC1) {
         width  += 3;
@@ -46,8 +47,8 @@ static av_cold int mvc_decode_init(AVCodecContext *avctx)
     }
     width  &= ~3;
     height &= ~3;
-    if (width != avctx->width || height != avctx->height)
-        avcodec_set_dimensions(avctx, width, height);
+    if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
+        return ret;
 
     avctx->pix_fmt = (avctx->codec_id == AV_CODEC_ID_MVC1) ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_BGRA;
     s->frame = av_frame_alloc();