From c2a24323bca735e68b002622c1083157f4efdf0c Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Apr 2018 20:30:25 +0200 Subject: client API: make sure to send IDLE event after mpv_initialize() This was slightly broken: since mp_initialize() did not necessarily interrupt core_thread() (which is waiting for initialization), it did not enter mp_play_files(), which would have sent an IDLE event. I suppose that in some cases (like with mpv-android), the initial IDLE event was never actually sent, because the first wakeup of the core thread happens with the "loadfile" command, which will disallow the core thread an IDLE event. --- player/client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/player/client.c b/player/client.c index edd929c203..247f580498 100644 --- a/player/client.c +++ b/player/client.c @@ -578,6 +578,7 @@ int mpv_initialize(mpv_handle *ctx) { lock_core(ctx); int res = mp_initialize(ctx->mpctx, NULL) ? MPV_ERROR_INVALID_PARAMETER : 0; + mp_wakeup_core(ctx->mpctx); unlock_core(ctx); return res; } -- cgit v1.2.3