vlc | branch: master | Mario Speiß <[email protected]> | 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 <[email protected]>

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

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to