aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-10-27 10:02:26 +0100
committerAnton Khirnov <anton@khirnov.net>2013-10-31 20:14:15 +0100
commit6c7254722ad43712db5686feee8bf75c74d8635b (patch)
tree174d034e1f22e6958ca9add5ca1e5a65ce44a6ab /libavcodec
parent2cd94ad5bff929d98eeb50aed46831b950421281 (diff)
downloadffmpeg-6c7254722ad43712db5686feee8bf75c74d8635b.tar.gz
mpeg12dec: stop using deprecated avcodec_set_dimensions
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12dec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 9d1696ce4b..53d1e0e400 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1141,6 +1141,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 ||
@@ -1162,7 +1163,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;
+
avctx->bit_rate = s->bit_rate;
s1->save_aspect_info = s->aspect_ratio_info;
s1->save_width = s->width;