diff --git a/libavformat/tty.c b/libavformat/tty.c index a71c6b1939..39380e2a5e 100644 --- a/libavformat/tty.c +++ b/libavformat/tty.c @@ -135,8 +135,8 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt) } pkt->size = av_get_packet(avctx->pb, pkt, n); - if (pkt->size <= 0) - return AVERROR(EIO); + if (pkt->size < 0) + return pkt->size; pkt->flags |= AV_PKT_FLAG_KEY; return 0; }