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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Sep 2 10:41:18 CEST 2012


On 2 Sep 2012, at 09:37, Peter Ross <pross at xvid.org> wrote:
> ---
> libavformat/tty.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/tty.c b/libavformat/tty.c
> index a71c6b1..aeb4e85 100644
> --- a/libavformat/tty.c
> +++ b/libavformat/tty.c
> @@ -136,7 +136,7 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
> 
>     pkt->size = av_get_packet(avctx->pb, pkt, n);
>     if (pkt->size <= 0)
> -        return AVERROR(EIO);
> +        return pkt->size;

I think that is wrong when size is 0.


More information about the ffmpeg-devel mailing list