[FFmpeg-cvslog] lavf/swf: Fix auto-detection of compressed files.
Carl Eugen Hoyos
git at videolan.org
Tue Aug 4 21:35:20 CEST 2015
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Aug 4 21:32:01 2015 +0200| [128e722bc10197320eef6c0f9948be7857afba86] | committer: Carl Eugen Hoyos
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.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=128e722bc10197320eef6c0f9948be7857afba86
---
libavformat/swfdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 31c26f8..ce1ad8f 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);
More information about the ffmpeg-cvslog
mailing list