diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-06-23 15:00:17 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-06-26 17:22:21 +0300 |
commit | 4b1b1449d95b3567d055fc410a1db137c811229c (patch) | |
tree | 60013e54de195e77cde267435ddf02716d351ced /libavformat/network.c | |
parent | e64bceeac0cdf312d9481b3dd1ec1fda7ee2b94c (diff) | |
download | ffmpeg-4b1b1449d95b3567d055fc410a1db137c811229c.tar.gz |
network: Don't redefine error codes if they already exist in errno.h
Since the errno.h values don't match the error codes that winsock
returns, map the winsock error codes to the errno ones, to make
sure explicit checks against AVERROR(x) match.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r-- | libavformat/network.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/network.c b/libavformat/network.c index 432084faa4..c2f7a9b0de 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -164,6 +164,14 @@ int ff_neterrno(void) return AVERROR(EAGAIN); case WSAEINTR: return AVERROR(EINTR); + case WSAEPROTONOSUPPORT: + return AVERROR(EPROTONOSUPPORT); + case WSAETIMEDOUT: + return AVERROR(ETIMEDOUT); + case WSAECONNREFUSED: + return AVERROR(ECONNREFUSED); + case WSAEINPROGRESS: + return AVERROR(EINPROGRESS); } return -err; } |