diff options
author | wm4 <wm4@nowhere> | 2014-12-22 01:53:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-22 01:53:39 +0100 |
commit | 4b4d3a57bf9c793c8a938ab1cdcf4e856d5b0ca1 (patch) | |
tree | bc6ce8a63a6c85ef09487c98520953dbc56b4eb0 /player | |
parent | bdae2f8fa85e2428af37a719ecb6c7452d0ee911 (diff) | |
download | mpv-4b4d3a57bf9c793c8a938ab1cdcf4e856d5b0ca1.tar.bz2 mpv-4b4d3a57bf9c793c8a938ab1cdcf4e856d5b0ca1.tar.xz |
client API: fix mpv_wakeup()
Of course this was going to get stuck in the retry loop.
Fixes #1372.
Diffstat (limited to 'player')
-rw-r--r-- | player/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/client.c b/player/client.c index 11a2fda4d8..4323f2e873 100644 --- a/player/client.c +++ b/player/client.c @@ -706,8 +706,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); @@ -715,6 +713,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"); |