[FFmpeg-cvslog] Detect null gop headers.

Michael Niedermayer git
Mon Feb 14 13:06:16 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Feb 13 17:20:46 2011 +0100| [2034ba08ec8d7d3eb66d83622a817f6bd2361c4f] | committer: Michael Niedermayer

Detect null gop headers.
Fix issue2592. / mpeg4-bad-gvop.raw

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2034ba08ec8d7d3eb66d83622a817f6bd2361c4f
---

 libavcodec/mpeg4videodec.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 673c4e8..71b4622 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);




More information about the ffmpeg-cvslog mailing list