# HG changeset patch # User rbultje # Date 1271356047 0 # Node ID 1c93ef22cea6e5d3494310d1684e1e3cc710582f # Parent c3ebc8d7af38c4393e1920915465c0c359662104 Fix compile error on mingw where ETIMEDOUT is missing (because it's a WSA error). This patch also changes FF_NETERROR() to be an AVERROR(), i.e. it is always negative, whereas it was previously positive. diff -r c3ebc8d7af38 -r 1c93ef22cea6 network.h --- a/network.h Thu Apr 15 13:30:12 2010 +0000 +++ b/network.h Thu Apr 15 18:27:27 2010 +0000 @@ -27,8 +27,8 @@ #include #include -#define ff_neterrno() WSAGetLastError() -#define FF_NETERROR(err) WSA##err +#define ff_neterrno() (-WSAGetLastError()) +#define FF_NETERROR(err) (-WSA##err) #define WSAEAGAIN WSAEWOULDBLOCK #else #include @@ -36,8 +36,8 @@ #include #include -#define ff_neterrno() errno -#define FF_NETERROR(err) err +#define ff_neterrno() AVERROR(errno) +#define FF_NETERROR(err) AVERROR(err) #endif #if HAVE_ARPA_INET_H diff -r c3ebc8d7af38 -r 1c93ef22cea6 rtsp.c --- a/rtsp.c Thu Apr 15 13:30:12 2010 +0000 +++ b/rtsp.c Thu Apr 15 18:27:27 2010 +0000 @@ -1692,7 +1692,7 @@ } #endif } else if (n == 0 && ++timeout_cnt >= MAX_TIMEOUTS) { - return AVERROR(ETIMEDOUT); + return FF_NETERROR(ETIMEDOUT); } else if (n < 0 && errno != EINTR) return AVERROR(errno); }