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

Peter Ross pross at xvid.org
Tue Sep 4 01:44:37 CEST 2012


---
Updated.

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

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120904/1182445e/attachment.asc>


More information about the ffmpeg-devel mailing list