diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-10-27 13:02:26 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-10-31 23:14:15 +0400 |
commit | 13207484bba8a8b78b40d5a22da8c9c555429089 (patch) | |
tree | 3ee62246895348184c40408ccbe45b2665ada053 | |
parent | 6c7254722ad43712db5686feee8bf75c74d8635b (diff) |
mpeg4video_parser: stop using deprecated avcodec_set_dimensions
-rw-r--r-- | libavcodec/mpeg4video_parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c index e291262d94..dfba84cfbb 100644 --- a/libavcodec/mpeg4video_parser.c +++ b/libavcodec/mpeg4video_parser.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "internal.h" #include "parser.h" #include "mpegvideo.h" #include "mpeg4video.h" @@ -89,7 +90,9 @@ static int av_mpeg4_decode_header(AVCodecParserContext *s1, init_get_bits(gb, buf, 8 * buf_size); ret = ff_mpeg4_decode_picture_header(s, gb); if (s->width && (!avctx->width || !avctx->height || !avctx->coded_width || !avctx->coded_height)) { - avcodec_set_dimensions(avctx, s->width, s->height); + ret = ff_set_dimensions(avctx, s->width, s->height); + if (ret < 0) + return ret; } s1->pict_type= s->pict_type; pc->first_picture = 0; |