summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Strasser <[email protected]>2014-10-05 03:42:32 +0200
committerMichael Niedermayer <[email protected]>2014-10-05 03:58:09 +0200
commitd61454e7c1de48f6a9059ca98f55e6beb52a618c (patch)
treed7384958f2ec0a6a8ac2d28d1a01967b69d20019
parentb02e4faa3ef9384c7d6a307e518e6446b045fb98 (diff)
avformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type glob)n2.4.2
Fixes ticket #3948 Based-on-patch-by: Michael Niedermayer <[email protected]> Signed-off-by: Alexander Strasser <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit e079d43af86c38a0c0efb9bc6058e1316e6a18f4) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/img2dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index ee484f6029..2969b51e32 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -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"))