summaryrefslogtreecommitdiffstats
path: root/libavformat/img2dec.c
diff options
context:
space:
mode:
authorAlexander Strasser <eclipse7@gmx.net>2014-10-05 03:42:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-05 03:56:42 +0200
commite079d43af86c38a0c0efb9bc6058e1316e6a18f4 (patch)
tree0cc7dfbcc29c1c8d7593fff9d309c2b5e83579de /libavformat/img2dec.c
parent345160a9cdf27c928c2430101513c5882e6f9fe1 (diff)
downloadffmpeg-streaming-e079d43af86c38a0c0efb9bc6058e1316e6a18f4.zip
ffmpeg-streaming-e079d43af86c38a0c0efb9bc6058e1316e6a18f4.tar.gz
avformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type glob)
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>
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r--libavformat/img2dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 7b3ba49..5f4e723 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"))
OpenPOWER on IntegriCloud