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

Message ID 20180813193015.15253-2-martin@martin.st
State Committed
Commit c194b9ad6dbe65f5abd68158c4811ed84e2a2b95
Headers show
Series
  • [1/3] http: pass return code from http_open_cnx_internal() on its failure
Related show

Commit Message

Martin Storsjö Aug. 13, 2018, 7:30 p.m.
From: Simon Thelen <ffmpeg-dev@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(-)

Patch

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;
 }