summaryrefslogtreecommitdiff
path: root/libavformat/network.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-06-23 15:00:17 +0300
committerMartin Storsjö <martin@martin.st>2012-06-26 17:22:21 +0300
commit4b1b1449d95b3567d055fc410a1db137c811229c (patch)
tree60013e54de195e77cde267435ddf02716d351ced /libavformat/network.c
parente64bceeac0cdf312d9481b3dd1ec1fda7ee2b94c (diff)
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.c8
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;
}