From c24a40349693e50aa81ef68a4a522503ca504d50 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Sat, 19 Feb 2011 19:14:11 +0100 Subject: libavformat: Remove FF_NETERRNO() Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR() error codes. Provide fallback definitions of other errno.h network errors, mapping them to the corresponding winsock errors. This eases catching these error codes in common code, without having to distinguish between FF_NETERRNO(EAGAIN) and AVERROR(EAGAIN). This fixes roundup issue 2614, unbreaking blocking network IO on windows. Signed-off-by: Ronald S. Bultje (cherry picked from commit 28c4741a6617a4c1d2490cb13fc70ae4c9c472da) --- libavformat/rtsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/rtsp.c') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index bc8cd67c81..62311cbb23 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1528,7 +1528,7 @@ redirect: goto fail; lower_transport_mask &= ~(1 << lower_transport); if (lower_transport_mask == 0 && err == 1) { - err = FF_NETERROR(EPROTONOSUPPORT); + err = AVERROR(EPROTONOSUPPORT); goto fail; } } while (err); @@ -1615,7 +1615,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, } #endif } else if (n == 0 && ++timeout_cnt >= MAX_TIMEOUTS) { - return FF_NETERROR(ETIMEDOUT); + return AVERROR(ETIMEDOUT); } else if (n < 0 && errno != EINTR) return AVERROR(errno); } -- cgit v1.2.3