1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/img2dec: pass error code and signal EOF

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-09-25 16:17:08 +02:00
parent 1dbdcb4a8c
commit 2497914a18

View File

@ -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++;