[FFmpeg-devel] [PATCH] avio: Check for FF_NETERROR(EAGAIN) in retry_transfer_wrapper
Martin Storsjö
martin
Thu Feb 17 15:29:53 CET 2011
On Thu, 17 Feb 2011, Luca Barbato wrote:
> On 02/17/2011 02:39 PM, Martin Storsj? wrote:
> > On Windows, FF_NETERROR(EAGAIN) isn't equal to AVERROR(EAGAIN).
> > Map the return value visible to user applications to the normal
> > AVERROR() codes.
> >
> > This fixes issue 2614.
> > ---
> > libavformat/avio.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavformat/avio.c b/libavformat/avio.c
> > index a19ec37..eca6ad2 100644
> > --- a/libavformat/avio.c
> > +++ b/libavformat/avio.c
> > @@ -219,6 +219,8 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
> > ret = transfer_func(h, buf+len, size-len);
> > if (ret == AVERROR(EINTR))
> > continue;
> > + if (ret == FF_NETERROR(EAGAIN))
> > + ret = AVERROR(EAGAIN);
> > if (h->flags & URL_FLAG_NONBLOCK)
> > return ret;
> > if (ret == AVERROR(EAGAIN)) {
>
> Seems good, are there other window-corner cases around?
No idea, haven't tested networking stuff on Windows lately, just picked up
this issue on roundup.
// Martin
More information about the ffmpeg-devel
mailing list