From b3fd2b175c90b4766034095e74e1f5112b1547ef Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 11 Sep 2014 16:48:03 +0200 Subject: avformat/img2dec: Fail probing when no data is yet available and the filename contains no number/glob patterns either. Fixes Ticket3901 the seek test error codes change due to a change in the failure path, this could be avoided by changing the respective error codes to EINVAL Signed-off-by: Michael Niedermayer --- libavformat/img2dec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/img2dec.c') diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 9f48c5d2a1..a21429f6ae 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 -- cgit v1.2.3