提交 2497914a 编写于 作者: M Michael Niedermayer

avformat/img2dec: pass error code and signal EOF

Found-by: Daemon404
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 1dbdcb4a
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册