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

Nicolas George nicolas.george
Thu Feb 17 15:49:53 CET 2011

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.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110217/a3e1604a/attachment.pgp>

More information about the ffmpeg-devel mailing list