summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 15:14:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 15:14:52 +0100
commit64a0ed190efa4c8d1514a7d258ab533b340408d8 (patch)
tree9574586d8083d3a2184b221c3a15d697020f8844 /libavcodec/mpeg12dec.c
parentbf92cd8178e0553a27971118e2b2b9e87e7b810b (diff)
parent13207484bba8a8b78b40d5a22da8c9c555429089 (diff)
Merge commit '13207484bba8a8b78b40d5a22da8c9c555429089'
* commit '13207484bba8a8b78b40d5a22da8c9c555429089': mpeg4video_parser: stop using deprecated avcodec_set_dimensions mpeg12dec: stop using deprecated avcodec_set_dimensions mjpegdec: stop using deprecated avcodec_set_dimensions libvpxdec: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4video_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 5e320bdeae..8d8bc98ed0 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1195,6 +1195,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
uint8_t old_permutation[64];
+ int ret;
if ((s1->mpeg_enc_ctx_allocated == 0) ||
avctx->coded_width != s->width ||
@@ -1217,7 +1218,10 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
if ((s->width == 0) || (s->height == 0))
return -2;
- avcodec_set_dimensions(avctx, s->width, s->height);
+ ret = ff_set_dimensions(avctx, s->width, s->height);
+ if (ret < 0)
+ return ret;
+
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->bit_rate) {
avctx->rc_max_rate = s->bit_rate;
} else if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && s->bit_rate &&