summaryrefslogtreecommitdiffstats
path: root/libavformat/img2dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-11 16:48:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-12 19:01:44 +0200
commitb3fd2b175c90b4766034095e74e1f5112b1547ef (patch)
tree3aaf02258362fba2cb76c378ac6a8852b89d6228 /libavformat/img2dec.c
parent917d14e6a20d05a58eb65ba9c766997886199c46 (diff)
downloadffmpeg-streaming-b3fd2b175c90b4766034095e74e1f5112b1547ef.zip
ffmpeg-streaming-b3fd2b175c90b4766034095e74e1f5112b1547ef.tar.gz
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 <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 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
OpenPOWER on IntegriCloud