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/sapenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/sapenc.c') diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index 91c1f628c7..bd3483e296 100644 --- a/libavformat/sapenc.c +++ b/libavformat/sapenc.c @@ -240,7 +240,7 @@ static int sap_write_packet(AVFormatContext *s, AVPacket *pkt) if (!sap->last_time || now - sap->last_time > 5000000) { int ret = url_write(sap->ann_fd, sap->ann, sap->ann_size); /* Don't abort even if we get "Destination unreachable" */ - if (ret < 0 && ret != FF_NETERROR(ECONNREFUSED)) + if (ret < 0 && ret != AVERROR(ECONNREFUSED)) return ret; sap->last_time = now; } -- cgit v1.2.3