From 28c4741a6617a4c1d2490cb13fc70ae4c9c472da 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 --- libavformat/rtspdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/rtspdec.c') diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index e484347896..e79f873e1b 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -311,7 +311,7 @@ retry: ret = ff_rtsp_fetch_packet(s, pkt); if (ret < 0) { - if (ret == FF_NETERROR(ETIMEDOUT) && !rt->packets) { + if (ret == AVERROR(ETIMEDOUT) && !rt->packets) { if (rt->lower_transport == RTSP_LOWER_TRANSPORT_UDP && rt->lower_transport_mask & (1 << RTSP_LOWER_TRANSPORT_TCP)) { RTSPMessageHeader reply1, *reply = &reply1; -- cgit v1.2.3