From a8a45dfe25ec63f23676258a11e57b312a794d4c Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 25 Mar 2013 16:14:55 +0100 Subject: 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). --- libavformat/avs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/avs.c b/libavformat/avs.c index b96a122c13..3e95a3656a 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; } -- cgit v1.2.3