[vlc-devel] [PATCH 4/4] poll: if select() gave nothing and timeout is 0, don't read WSA events

Steve Lhomme robux4 at videolabs.io
Tue Dec 1 10:40:50 CET 2015


---
 compat/poll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compat/poll.c b/compat/poll.c
index da1e71c..b1629c2 100644
--- a/compat/poll.c
+++ b/compat/poll.c
@@ -192,7 +192,7 @@ int poll(struct pollfd *fds, unsigned nfds, int timeout)
     }
 
     unsigned count = 0;
-    if (ret == WSA_WAIT_FAILED)
+    if (ret == WSA_WAIT_FAILED && to > 0)
     {
         ret = WSAWaitForMultipleEvents(nfds, evts, FALSE, to, TRUE);
 
-- 
2.6.3



More information about the vlc-devel mailing list