[FFmpeg-cvslog] avs: Increase magic value score above file extension score
Diego Biurrun
git at videolan.org
Sun May 5 12:45:38 CEST 2013
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Mar 25 16:14:55 2013 +0100| [a8a45dfe25ec63f23676258a11e57b312a794d4c] | committer: Diego Biurrun
avs: Increase magic value score above file extension score
This should fix misdetection of AVS files as AviSynth scripts
when AviSynth support is enabled (Bugzilla #357).
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a8a45dfe25ec63f23676258a11e57b312a794d4c
---
libavformat/avs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/avs.c b/libavformat/avs.c
index b96a122..3e95a36 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -50,7 +50,9 @@ static int avs_probe(AVProbeData * p)
d = p->buf;
if (d[0] == 'w' && d[1] == 'W' && d[2] == 0x10 && d[3] == 0)
- return AVPROBE_SCORE_EXTENSION;
+ /* Ensure the buffer probe scores higher than the extension probe.
+ * This avoids problems with misdetection as AviSynth scripts. */
+ return AVPROBE_SCORE_EXTENSION + 1;
return 0;
}
More information about the ffmpeg-cvslog
mailing list