diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-02-13 17:20:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-13 17:20:46 +0100 |
commit | 2034ba08ec8d7d3eb66d83622a817f6bd2361c4f (patch) | |
tree | 9245d2c5d06668cb749687f0eb372a5edea7e4a6 /libavcodec | |
parent | 0a18b64585ca3f9181229dcc4ccb62bc6b939679 (diff) | |
download | ffmpeg-2034ba08ec8d7d3eb66d83622a817f6bd2361c4f.tar.gz |
Detect null gop headers.
Fix issue2592. / mpeg4-bad-gvop.raw
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg4videodec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 673c4e865c..71b4622109 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1495,6 +1495,11 @@ end: static int mpeg4_decode_gop_header(MpegEncContext * s, GetBitContext *gb){ int hours, minutes, seconds; + if(!show_bits(gb, 18)){ + av_log(s->avctx, AV_LOG_WARNING, "GOP header invalid\n"); + return -1; + } + hours= get_bits(gb, 5); minutes= get_bits(gb, 6); skip_bits1(gb); |