mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
avformat/swfdec: return AVPROBE_SCORE_MAX / 4 for unexpected versions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b570835296
commit
9225ebd50d
@ -59,11 +59,14 @@ static int swf_probe(AVProbeData *p)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* check file header */
|
/* check file header */
|
||||||
if ((p->buf[0] == 'F' || p->buf[0] == 'C') && p->buf[1] == 'W' &&
|
if ( AV_RB24(p->buf) != AV_RB24("CWS")
|
||||||
p->buf[2] == 'S' && p->buf[3] < 20)
|
&& AV_RB24(p->buf) != AV_RB24("FWS"))
|
||||||
return AVPROBE_SCORE_MAX;
|
|
||||||
else
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (p->buf[3] >= 20)
|
||||||
|
return AVPROBE_SCORE_MAX / 4;
|
||||||
|
|
||||||
|
return AVPROBE_SCORE_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_ZLIB
|
#if CONFIG_ZLIB
|
||||||
|
Loading…
Reference in New Issue
Block a user