avformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type...
authorAlexander Strasser <eclipse7@gmx.net>
Sun, 5 Oct 2014 01:42:32 +0000 (03:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Oct 2014 01:56:42 +0000 (03:56 +0200)
Fixes ticket #3948

Based-on-patch-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/img2dec.c

index 7b3ba49..5f4e723 100644 (file)
@@ -162,6 +162,8 @@ static int img_read_probe(AVProbeData *p)
             return AVPROBE_SCORE_MAX;
         else if (is_glob(p->filename))
             return AVPROBE_SCORE_MAX;
+        else if (p->filename[strcspn(p->filename, "*?{")]) // probably PT_GLOB
+            return AVPROBE_SCORE_EXTENSION + 2; // score chosen to be a tad above the image pipes
         else if (p->buf_size == 0)
             return 0;
         else if (av_match_ext(p->filename, "raw") || av_match_ext(p->filename, "gif"))