diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-25 16:17:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-04 23:52:28 +0200 |
commit | 76a5cf1f80a23316b02ab52f9459159b8efec84a (patch) | |
tree | 6842ecd38cbb801a4e17bdf57b031c314671fb06 | |
parent | 16c3d6d3927ef4b8e8f5fb58d5fef064957edce2 (diff) | |
download | ffmpeg-76a5cf1f80a23316b02ab52f9459159b8efec84a.tar.gz |
avformat/img2dec: pass error code and signal EOF
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2497914a1846c1dbcfb853ea834da0038f0e22f5)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/img2dec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index ad778123f7..bb941268d6 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -463,7 +463,13 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) if (ret[0] <= 0 || ret[1] < 0 || ret[2] < 0) { av_free_packet(pkt); - return AVERROR(EIO); /* signal EOF */ + if (ret[0] < 0) { + return ret[0]; + } else if (ret[1] < 0) { + return ret[1]; + } else if (ret[2] < 0) + return ret[2]; + return AVERROR_EOF; } else { s->img_count++; s->img_number++; |