From 299489714abaa71cf36d5e5078d6229a4ba3c1a7 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Tue, 4 Sep 2012 09:44:37 +1000 Subject: [PATCH] tty: return av_get_packet() error codes instead of converting them to EIO Signed-off-by: Michael Niedermayer --- libavformat/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }