[FFmpeg-cvslog] tty: return av_get_packet() error codes instead of converting them to EIO

Peter Ross git at videolan.org
Tue Sep 4 06:16:35 CEST 2012


ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Tue Sep  4 09:44:37 2012 +1000| [299489714abaa71cf36d5e5078d6229a4ba3c1a7] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=299489714abaa71cf36d5e5078d6229a4ba3c1a7
---

 libavformat/tty.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
 }



More information about the ffmpeg-cvslog mailing list