[vlc-commits] too long timeouts in win32 vlc_poll

Mario Speiß git at videolan.org
Sun Feb 3 18:26:31 CET 2013


vlc | branch: master | Mario Speiß <1034-135 at online.de> | Sun Feb  3 19:25:35 2013 +0200| [e4dc6784ed497fef0fbbad4d1c3fa4a5254ffdf0] | committer: Rémi Denis-Courmont

too long timeouts in win32 vlc_poll

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 at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4dc6784ed497fef0fbbad4d1c3fa4a5254ffdf0
---

 include/vlc_threads.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 7c6a4ca..337ded4 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -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;



More information about the vlc-commits mailing list