[FFmpeg-devel] [PATCH 4/4] avformat/img2dec: Fail probing when no data is yet available and the filename contains no number/glob patterns either.

Michael Niedermayer michaelni at gmx.at
Thu Sep 11 16:48:03 CEST 2014


Fixes Ticket3901

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavformat/img2dec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 9f48c5d..a21429f 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->buf_size == 0)
+            return 0;
         else if (av_match_ext(p->filename, "raw") || av_match_ext(p->filename, "gif"))
             return 5;
         else
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list