network: Use ff_neterrno instead of AVERROR(errno) for poll errors
authorSimon Thelen <ffmpeg-dev@c-14.de>
Sat, 8 Apr 2017 12:21:28 +0000 (14:21 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 14 Aug 2018 19:30:29 +0000 (22:30 +0300)
This makes sure to pick up the actual error codes on windows.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/network.c

index 86d7955..1e02668 100644 (file)
@@ -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;
 }