diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/client.c | 5 | ||||
-rw-r--r-- | player/command.c | 3 | ||||
-rw-r--r-- | player/lua.c | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/player/client.c b/player/client.c index f95ad372b5..51cc0c9dac 100644 --- a/player/client.c +++ b/player/client.c @@ -416,6 +416,8 @@ void mpv_detach_destroy(mpv_handle *ctx) ctx->num_events--; } mp_msg_log_buffer_destroy(ctx->messages); + osd_set_external(ctx->mpctx->osd, ctx, 0, 0, NULL); + mp_input_remove_sections_by_owner(ctx->mpctx->input, ctx->name); pthread_cond_destroy(&ctx->wakeup); pthread_mutex_destroy(&ctx->wakeup_lock); pthread_mutex_destroy(&ctx->lock); @@ -759,6 +761,9 @@ mpv_event *mpv_wait_event(mpv_handle *ctx, double timeout) { mpv_event *event = ctx->cur_event; + if (!ctx->mpctx->initialized) + return NULL; + pthread_mutex_lock(&ctx->lock); if (!ctx->fuzzy_initialized) diff --git a/player/command.c b/player/command.c index d5d95602a6..721a79df83 100644 --- a/player/command.c +++ b/player/command.c @@ -5282,7 +5282,8 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re case MP_CMD_DEFINE_INPUT_SECTION: mp_input_define_section(mpctx->input, cmd->args[0].v.s, "<api>", - cmd->args[1].v.s, !!cmd->args[2].v.i); + cmd->args[1].v.s, !!cmd->args[2].v.i, + cmd->sender); break; case MP_CMD_AB_LOOP: { diff --git a/player/lua.c b/player/lua.c index 964ba7c07a..1c3d526349 100644 --- a/player/lua.c +++ b/player/lua.c @@ -391,7 +391,6 @@ static int load_lua(struct mpv_handle *client, const char *fname) r = 0; error_out: - osd_set_external(ctx->mpctx->osd, client, 0, 0, NULL); // remove overlay mp_resume_all(client); if (ctx->state) lua_close(ctx->state); |