diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-11-01 19:03:32 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-11-01 19:05:35 +0000 |
commit | 0610d6e8ae609e2b4b96cc5881e4ee19d763d66d (patch) | |
tree | 0eb28942e7a4c75ba76d7190e984416271fb6418 /libavcodec/mvcdec.c | |
parent | 256b986c04aa327a9e8b595e08f42fdc50f0e121 (diff) | |
download | ffmpeg-0610d6e8ae609e2b4b96cc5881e4ee19d763d66d.tar.gz |
avcodec/mvcdec: stop using deprecated avcodec_set_dimensions()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/mvcdec.c')
-rw-r--r-- | libavcodec/mvcdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mvcdec.c b/libavcodec/mvcdec.c index 423c7c43dc..2cc7735cfb 100644 --- a/libavcodec/mvcdec.c +++ b/libavcodec/mvcdec.c @@ -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(); |