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

Ronald S. Bultje rsbultje
Thu Feb 17 17:25:11 CET 2011


Hi,

On Thu, Feb 17, 2011 at 11:22 AM, Martin Storsj? <martin at martin.st> wrote:
> 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.

Sounds good to me, I've always disliked this FF_NETERROR() thing, it's
just very prone to stupid bugs that we can't really find because
they're win32-only and error-only.

Ronald



More information about the ffmpeg-devel mailing list