Browse Source

avformat/swfdec: check version and size during probing

Fixes probetest failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
ff1d81b08c
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/swfdec.c

+ 4
- 1
libavformat/swfdec.c View File

@@ -55,9 +55,12 @@ static int get_swf_tag(AVIOContext *pb, int *len_ptr)

static int swf_probe(AVProbeData *p)
{
if(p->buf_size < 15)
return 0;

/* check file header */
if ((p->buf[0] == 'F' || p->buf[0] == 'C') && p->buf[1] == 'W' &&
p->buf[2] == 'S')
p->buf[2] == 'S' && p->buf[3] < 20)
return AVPROBE_SCORE_MAX;
else
return 0;


Loading…
Cancel
Save