[FFmpeg-devel] [PATCH] avio: Check for FF_NETERROR(EAGAIN) in retry_transfer_wrapper
Luca Barbato
lu_zero
Thu Feb 17 16:06:19 CET 2011
On 02/17/2011 03:49 PM, 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.
Looks the most promising place. Well spotted =)
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list