diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-11 16:48:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-12 19:01:44 +0200 |
commit | b3fd2b175c90b4766034095e74e1f5112b1547ef (patch) | |
tree | 3aaf02258362fba2cb76c378ac6a8852b89d6228 /libavformat/img2dec.c | |
parent | 917d14e6a20d05a58eb65ba9c766997886199c46 (diff) | |
download | ffmpeg-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |