diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-10-27 10:02:26 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-10-31 20:14:15 +0100 |
commit | 2cd94ad5bff929d98eeb50aed46831b950421281 (patch) | |
tree | 2ee427492638856857f25af4391c43db3c5ed8e6 /libavcodec | |
parent | b870582485f6b4fbfd68447b786f0b5cf993e17f (diff) | |
download | ffmpeg-2cd94ad5bff929d98eeb50aed46831b950421281.tar.gz |
mjpegdec: stop using deprecated avcodec_set_dimensions
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpegdec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index fdf7c87675..dea195b483 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -211,7 +211,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s) int ff_mjpeg_decode_sof(MJpegDecodeContext *s) { - int len, nb_components, i, width, height, pix_fmt_id; + int len, nb_components, i, width, height, pix_fmt_id, ret; /* XXX: verify len field validity */ len = get_bits(&s->gb, 16); @@ -309,7 +309,9 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) height *= 2; } - avcodec_set_dimensions(s->avctx, width, height); + ret = ff_set_dimensions(s->avctx, width, height); + if (ret < 0) + return ret; s->first_picture = 0; } |