From 54b6bef6e13adf377c78c28ede22a4322ab28865 Mon Sep 17 00:00:00 2001 From: Simon Thelen Date: Sat, 8 Apr 2017 14:21:28 +0200 Subject: libavformat/tcp: fix return code for tcp_accept ff_accept can return AVERROR(ETIMEDOUT) and errno will be 0 (or undefined), return ret instead and return ff_neterror() in ff_poll_interrupt instead of AVERROR(errno) to parse WSAGetLastError on Windows. Signed-off-by: Michael Niedermayer --- libavformat/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/network.c') diff --git a/libavformat/network.c b/libavformat/network.c index 2fb1c8b02a..b3987a4d11 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -159,7 +159,7 @@ static int ff_poll_interrupt(struct pollfd *p, nfds_t nfds, int timeout, if (!ret) return AVERROR(ETIMEDOUT); if (ret < 0) - return AVERROR(errno); + return ff_neterrno(); return ret; } -- cgit v1.2.3