1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mjpegdec: stop using deprecated avcodec_set_dimensions

This commit is contained in:
Anton Khirnov 2013-10-27 10:02:26 +01:00
parent b870582485
commit 2cd94ad5bf

View File

@ -211,7 +211,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
int ff_mjpeg_decode_sof(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 */ /* XXX: verify len field validity */
len = get_bits(&s->gb, 16); len = get_bits(&s->gb, 16);
@ -309,7 +309,9 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
height *= 2; 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; s->first_picture = 0;
} }