[libav-devel] [PATCH 2/3] network: Use ff_neterrno instead of AVERROR(errno) for poll errors

Martin Storsjö martin at martin.st
Mon Aug 13 21:30:14 CEST 2018


From: Simon Thelen <ffmpeg-dev at c-14.de>

This makes sure to pick up the actual error codes on windows.
---
 libavformat/network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/network.c b/libavformat/network.c
index 86d79553f7..1e02668ecf 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -138,7 +138,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;
 }
 
-- 
2.15.2 (Apple Git-101.1)



More information about the libav-devel mailing list