img2dec: detect .raw files only with a low score as img2
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Oct 2012 19:40:03 +0000 (21:40 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Oct 2012 19:40:03 +0000 (21:40 +0200)
They can be many other things and this otherwise breaks probing of some .raw files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/img2dec.c

index 1190af3..79f10b9 100644 (file)
@@ -179,6 +179,8 @@ static int read_probe(AVProbeData *p)
             return AVPROBE_SCORE_MAX;
         else if (is_glob(p->filename))
             return AVPROBE_SCORE_MAX;
+        else if(av_match_ext(p->filename, "raw"))
+            return 5;
         else
             return AVPROBE_SCORE_MAX/2;
     }