summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-22 01:53:39 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:13 +0900
commit12ee2e64be351a91865aac96e43906f09347f0ff (patch)
tree5e5bcefbb9dd361760090fdc0f45a91b44b141d6
parentead565afb31db72c97ba5b2cd17bec2bfa115eb7 (diff)
downloadmpv-12ee2e64be351a91865aac96e43906f09347f0ff.tar.bz2
mpv-12ee2e64be351a91865aac96e43906f09347f0ff.tar.xz
client API: fix mpv_wakeup()
Of course this was going to get stuck in the retry loop. Fixes #1372.
-rw-r--r--player/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/client.c b/player/client.c
index 8cd47df4ab..ff2873bf4c 100644
--- a/player/client.c
+++ b/player/client.c
@@ -703,8 +703,6 @@ mpv_event *mpv_wait_event(mpv_handle *ctx, double timeout)
if (timeout < 0)
timeout = 1e20;
- if (ctx->queued_wakeup)
- timeout = 0;
int64_t deadline = mp_add_timeout(mp_time_us(), timeout);
@@ -712,6 +710,8 @@ mpv_event *mpv_wait_event(mpv_handle *ctx, double timeout)
talloc_free_children(event);
while (1) {
+ if (ctx->queued_wakeup)
+ deadline = 0;
// This will almost surely lead to a deadlock. (Polling is still ok.)
if (ctx->suspend_count && timeout > 0) {
MP_ERR(ctx, "attempting to wait while core is suspended");