[FFmpeg-cvslog] avformat/img2dec: Attempt to detect non-escaped glob patterns too ( -pattern_type glob)

Alexander Strasser git at videolan.org
Sun Oct 5 03:58:15 CEST 2014


ffmpeg | branch: master | Alexander Strasser <eclipse7 at gmx.net> | Sun Oct  5 03:42:32 2014 +0200| [e079d43af86c38a0c0efb9bc6058e1316e6a18f4] | committer: Michael Niedermayer

avformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type glob)

Fixes ticket #3948

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e079d43af86c38a0c0efb9bc6058e1316e6a18f4
---

 libavformat/img2dec.c |    2 ++
 1 file changed, 2 insertions(+)

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"))



More information about the ffmpeg-cvslog mailing list