tty: return av_get_packet() error codes instead of converting them to EIO
authorPeter Ross <pross@xvid.org>
Mon, 3 Sep 2012 23:44:37 +0000 (09:44 +1000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 4 Sep 2012 04:12:18 +0000 (06:12 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/tty.c

index a71c6b193999f9e9c997faabe17ce749351daf27..39380e2a5e622a5700f22ad88efab235d9cbe96e 100644 (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)
-        return AVERROR(EIO);
+    if (pkt->size < 0)
+        return pkt->size;
     pkt->flags |= AV_PKT_FLAG_KEY;
     return 0;
 }
     pkt->flags |= AV_PKT_FLAG_KEY;
     return 0;
 }