diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-08-04 22:32:01 +0300 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-08-04 22:34:00 +0300 |
commit | 128e722bc10197320eef6c0f9948be7857afba86 (patch) | |
tree | 8bde01df3f41c71c93b4dc323354377007324582 /libavformat/swfdec.c | |
parent | f0b7882ceb791ff32267ad97bd21a09e9cbf83d5 (diff) |
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.
Diffstat (limited to 'libavformat/swfdec.c')
-rw-r--r-- | libavformat/swfdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 31c26f8bd4..ce1ad8fc9f 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -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); |