summaryrefslogtreecommitdiffstats
path: root/player/lua/defaults.lua
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-07 10:44:21 +0200
committerwm4 <wm4@nowhere>2014-06-07 15:57:47 +0200
commita1000962e3ef3e4cf3f6ade8702ce055b38872a9 (patch)
treeda8050c203f0744dfac71f32f170c85c7659d95f /player/lua/defaults.lua
parent60e0833f1fe976b0bbb74aa60980bfb36d828dee (diff)
downloadmpv-a1000962e3ef3e4cf3f6ade8702ce055b38872a9.tar.bz2
mpv-a1000962e3ef3e4cf3f6ade8702ce055b38872a9.tar.xz
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.
Diffstat (limited to 'player/lua/defaults.lua')
-rw-r--r--player/lua/defaults.lua2
1 files changed, 1 insertions, 1 deletions
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