Browse Source

Make flic probe check a few more things.

fixes issue399

Originally committed as revision 14235 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 17 years ago
parent
commit
154dffd04c
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      libavformat/flic.c

+ 13
- 0
libavformat/flic.c View File

@@ -54,12 +54,25 @@ static int flic_probe(AVProbeData *p)
{
int magic_number;

if(p->buf_size < FLIC_HEADER_SIZE)
return 0;

magic_number = AV_RL16(&p->buf[4]);
if ((magic_number != FLIC_FILE_MAGIC_1) &&
(magic_number != FLIC_FILE_MAGIC_2) &&
(magic_number != FLIC_FILE_MAGIC_3))
return 0;

if(AV_RL16(&p->buf[0x10]) != FLIC_CHUNK_MAGIC_1){
if(AV_RL32(&p->buf[0x10]) > 2000)
return 0;
}

if( AV_RL16(&p->buf[0x08]) > 4096
|| AV_RL16(&p->buf[0x0A]) > 4096)
return 0;


return AVPROBE_SCORE_MAX;
}



Loading…
Cancel
Save