lavf/swf: Fix auto-detection of compressed files.

Fixes auto-detection of compressed swf files as in
http://samples.ffmpeg.org/SWF/compressed-swf/
Reported by forum user Zard1096.
This commit is contained in:
Carl Eugen Hoyos 2015-08-04 21:32:01 +02:00
parent f0b7882ceb
commit 128e722bc1
1 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,10 @@ static int swf_probe(AVProbeData *p)
&& AV_RB24(p->buf) != AV_RB24("FWS"))
return 0;
if ( AV_RB24(p->buf) == AV_RB24("CWS")
&& p->buf[3] <= 20)
return AVPROBE_SCORE_MAX / 4 + 1;
init_get_bits8(&gb, p->buf + 3, p->buf_size - 3);
skip_bits(&gb, 40);