vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sat May 9 15:23:02 2015 +0300| [8459d80839c0418457e8c9f3f21c58835652a6c4] | committer: Rémi Denis-Courmont
threads: remove arbitrary timeout in Windows poll() emulation > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8459d80839c0418457e8c9f3f21c58835652a6c4 --- include/vlc_threads.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 89c0f9d..dfe61ed 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -81,17 +81,10 @@ static inline int vlc_poll(struct pollfd *fds, unsigned nfds, int timeout) { int val; - do - { - int ugly_timeout = ((unsigned)timeout >= 50) ? 50 : timeout; - if (timeout >= 0) - timeout -= ugly_timeout; - - vlc_testcancel (); - val = poll (fds, nfds, ugly_timeout); - } - while (val == 0 && timeout != 0); - + vlc_testcancel(); + val = poll(fds, nfds, timeout); + if (val < 0) + vlc_testcancel(); return val; } # define poll(u,n,t) vlc_poll(u, n, t) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
