tty: return av_get_packet() error codes instead of converting them to EIO

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Peter Ross 2012-09-04 09:44:37 +10:00 committed by Michael Niedermayer
parent bf959ac2c6
commit 299489714a

View file

@ -135,8 +135,8 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
} }
pkt->size = av_get_packet(avctx->pb, pkt, n); pkt->size = av_get_packet(avctx->pb, pkt, n);
if (pkt->size <= 0) if (pkt->size < 0)
return AVERROR(EIO); return pkt->size;
pkt->flags |= AV_PKT_FLAG_KEY; pkt->flags |= AV_PKT_FLAG_KEY;
return 0; return 0;
} }