summaryrefslogtreecommitdiffstats
path: root/player/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/client.c')
-rw-r--r--player/client.c5
1 files changed, 5 insertions, 0 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)