diff options
author | wm4 <wm4@nowhere> | 2014-06-07 10:44:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-07 15:57:47 +0200 |
commit | a1000962e3ef3e4cf3f6ade8702ce055b38872a9 (patch) | |
tree | da8050c203f0744dfac71f32f170c85c7659d95f /player/lua | |
parent | 60e0833f1fe976b0bbb74aa60980bfb36d828dee (diff) | |
download | mpv-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')
-rw-r--r-- | player/lua/defaults.lua | 2 |
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 |