On 10/12/2012 10:07 AM, Martin Storsjö wrote: > From: Michael Niedermayer <michae...@gmx.at> > > ffurl_read_complete can return 0 as well as negative error codes. > --- > libavformat/rtspdec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c > index 7476c45..d46f1a4 100644 > --- a/libavformat/rtspdec.c > +++ b/libavformat/rtspdec.c > @@ -76,8 +76,8 @@ static inline int read_line(AVFormatContext *s, char *rbuf, > const int rbufsize, > > do { > ret = ffurl_read_complete(rt->rtsp_hd, rbuf + idx, 1); > - if (ret < 0) > - return ret; > + if (ret <= 0) > + return ret ? ret : AVERROR_EOF; > if (rbuf[idx] == '\r') { > /* Ignore */ > } else if (rbuf[idx] == '\n') {
I wonder why 0 should appear here, we are asking 1, we should get an eagain. lu _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel