[FFmpeg-devel] [PATCH] avio: Check for FF_NETERROR(EAGAIN) in retry_transfer_wrapper

Martin Storsjö martin
Thu Feb 17 17:22:57 CET 2011


On Thu, 17 Feb 2011, Nicolas George wrote:

> Le nonidi 29 pluvi?se, an CCXIX, Luca Barbato a ?crit?:
> > It would mean repeat that for every network protocol, might worth a try
> > though.
> 
> All (almost?) protocols use the ff_neterrno() macro, which is defined, on
> windows, as:
> 
> #define ff_neterrno() (-WSAGetLastError())
> 
> It could become:
> 
> static inline int ff_neterrno(void)
> {
>     int err = -WSAGetLastError();
>     return err == -WSAEWOULDBLOCK ? AVERROR(EAGAIN) : err;
> }
> 
> This would become a good place for similar mappings should they become
> necessary in the future.

If this change is done, all uses of FF_NETERROR(EAGAIN) need to be 
switched to AVERROR(EAGAIN) at the same time.

// Martin



More information about the ffmpeg-devel mailing list