You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/mpeg4video_parser: Check for extradata parsing failure
Found-by: CSA Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -88,6 +88,8 @@ static int mpeg4_decode_header(AVCodecParserContext *s1, AVCodecContext *avctx,
|
|||||||
if (avctx->extradata_size && pc->first_picture) {
|
if (avctx->extradata_size && pc->first_picture) {
|
||||||
init_get_bits(gb, avctx->extradata, avctx->extradata_size * 8);
|
init_get_bits(gb, avctx->extradata, avctx->extradata_size * 8);
|
||||||
ret = ff_mpeg4_decode_picture_header(dec_ctx, gb);
|
ret = ff_mpeg4_decode_picture_header(dec_ctx, gb);
|
||||||
|
if (ret < 0)
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "Failed to parse extradata\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
init_get_bits(gb, buf, 8 * buf_size);
|
init_get_bits(gb, buf, 8 * buf_size);
|
||||||
|
Reference in New Issue
Block a user