Commit d44d7531 authored by rbultje's avatar rbultje

Fix compile error on cygwin where ETIME 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.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22887 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 85f93f10
......@@ -27,8 +27,8 @@
#include <winsock2.h>
#include <ws2tcpip.h>
#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 <sys/types.h>
......@@ -36,8 +36,8 @@
#include <netinet/in.h>
#include <netdb.h>
#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
......
......@@ -1692,7 +1692,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
}
#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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment