diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-25 16:17:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-25 16:20:23 +0200 |
commit | 2497914a1846c1dbcfb853ea834da0038f0e22f5 (patch) | |
tree | 6746bedfdca3cda46dce8ab4d0c9852e40445be3 /libavformat/img2dec.c | |
parent | 1dbdcb4a8c76df70ab41e3dacbfe01d59ed4091e (diff) | |
download | ffmpeg-2497914a1846c1dbcfb853ea834da0038f0e22f5.tar.gz |
avformat/img2dec: pass error code and signal EOF
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/img2dec.c')
-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++; |