diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-04 06:05:59 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-09 09:30:36 +0100 |
commit | f0194e860e33cb60a80305eae2262b2e7977c908 (patch) | |
tree | 7061ff364816603fcc17d33b76366ea3fda51a2c /libavcodec/mpeg4video_parser.c | |
parent | 6739bb5a0e749a4936a274ceff7aab2b488393c6 (diff) | |
download | ffmpeg-f0194e860e33cb60a80305eae2262b2e7977c908.tar.gz |
avcodec/mpeg4video: Skip unneeded element when parsing picture header
Namely, skip some elements that are only useful for a decoder
when calling ff_mpeg4_decode_picture_header() from the MPEG-4 parser.
In particular, this ensures that the VLCs need no longer be
initialized by the parser.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpeg4video_parser.c')
-rw-r--r-- | libavcodec/mpeg4video_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c index c68c966259..9e96619a12 100644 --- a/libavcodec/mpeg4video_parser.c +++ b/libavcodec/mpeg4video_parser.c @@ -100,13 +100,13 @@ static int mpeg4_decode_header(AVCodecParserContext *s1, AVCodecContext *avctx, if (avctx->extradata_size && pc->first_picture) { init_get_bits(gb, avctx->extradata, avctx->extradata_size * 8); - ret = ff_mpeg4_decode_picture_header(dec_ctx, gb, 1); + ret = ff_mpeg4_decode_picture_header(dec_ctx, gb, 1, 1); if (ret < 0) av_log(avctx, AV_LOG_WARNING, "Failed to parse extradata\n"); } init_get_bits(gb, buf, 8 * buf_size); - ret = ff_mpeg4_decode_picture_header(dec_ctx, gb, 0); + ret = ff_mpeg4_decode_picture_header(dec_ctx, gb, 0, 1); if (s->width && (!avctx->width || !avctx->height || !avctx->coded_width || !avctx->coded_height)) { ret = ff_set_dimensions(avctx, s->width, s->height); |