From: Peter Ross Date: Mon, 3 Sep 2012 23:44:37 +0000 (+1000) Subject: tty: return av_get_packet() error codes instead of converting them to EIO X-Git-Tag: n1.1-dev~455 X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/299489714abaa71cf36d5e5078d6229a4ba3c1a7 tty: return av_get_packet() error codes instead of converting them to EIO Signed-off-by: Michael Niedermayer --- diff --git a/libavformat/tty.c b/libavformat/tty.c index a71c6b1..39380e2 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; }