From a1000962e3ef3e4cf3f6ade8702ce055b38872a9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 7 Jun 2014 10:44:21 +0200 Subject: client API: change mpv_wait_event() timeout semantics Now a negative timeout mean an infinite timeout. This is similar to the poll() system call. Apparently this is more intuitive and less confusing than specifying a "very high" value as timeout if you want to wait forever. For callers that never pass negative timeouts, nothing changes. --- player/lua/defaults.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/lua/defaults.lua') diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index c264175768..37c05dea92 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -360,7 +360,7 @@ function mp.dispatch_events(allow_wait) if wait == nil then wait = 1e20 -- infinity for all practical purposes end - if more_events then + if more_events or wait < 0 then wait = 0 end -- Resume playloop - important especially if an error happened while -- cgit v1.2.3