aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-16 02:43:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-16 02:43:36 +0200
commit647ec6fc0308ccfc86ad48b1d7d20d85ddf6825c (patch)
tree310543f8643163058b8f225c5124f94abb55f563
parent658c5209fb548746269470a7f2c52b9ad443e72e (diff)
downloadffmpeg-647ec6fc0308ccfc86ad48b1d7d20d85ddf6825c.tar.gz
bit: require at least 1 frame for probing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/bit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/bit.c b/libavformat/bit.c
index 7400d24fdc..d72d2a8961 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;