[FFmpeg-cvslog] bit: require at least 1 frame for probing

Michael Niedermayer git at videolan.org
Sun Oct 16 03:10:00 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 16 02:43:36 2011 +0200| [647ec6fc0308ccfc86ad48b1d7d20d85ddf6825c] | committer: Michael Niedermayer

bit: require at least 1 frame for probing

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/bit.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavformat/bit.c b/libavformat/bit.c
index 7400d24..d72d2a8 100644
--- a/libavformat/bit.c
+++ b/libavformat/bit.c
@@ -12,6 +12,9 @@ static int probe(AVProbeData *p)
 {
     int i, j;
 
+    if(p->buf_size < 0x40)
+        return 0;
+
     for(i=0; i+3<p->buf_size && i< 10*0x50; ){
         if(AV_RL16(&p->buf[0]) != SYNC_WORD)
             return 0;



More information about the ffmpeg-cvslog mailing list