]> git.sesse.net Git - vlc/commitdiff
too long timeouts in win32 vlc_poll
authorMario Speiß <1034-135@online.de>
Sun, 3 Feb 2013 17:25:35 +0000 (19:25 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 3 Feb 2013 17:26:07 +0000 (19:26 +0200)
When vlc_poll is called with timeout of i.e. 5000ms it may happen that the
waiting time might be as long as 2500s ! Probably poll should be called with
the 50ms timeout as many times until the original provided timeout has been
reached.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
include/vlc_threads.h

index 7c6a4ca08735c60fecc6fbc6a9bf6ae9ffe6ecb1..337ded42df55f4a879a01b3ac011b6b6c5115b7b 100644 (file)
@@ -392,7 +392,7 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
 
     while (timeout > 50)
     {
-        int val = poll (fds, nfds, timeout);
+        int val = poll (fds, nfds, 50);
         if (val != 0)
             return val;
         timeout -= 50;