From f92d5da89cf0b025f1bee1801e66911fe1efb6ff Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:35:40 -0400 Subject: [PATCH] player/main: uninit input after terminal uninit The terminal input thread holds the input_ctx reference. Fixes: c1282d4d43be8fb8bbc8529b22804d288d59038a --- player/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/player/main.c b/player/main.c index 5a3bac2a68..fcb2ae4ec7 100644 --- a/player/main.c +++ b/player/main.c @@ -187,8 +187,6 @@ void mp_destroy(struct MPContext *mpctx) cocoa_set_input_context(NULL); #endif - mp_input_uninit(mpctx->input); - uninit_libav(mpctx->global); mp_msg_uninit(mpctx->global); @@ -198,6 +196,8 @@ void mp_destroy(struct MPContext *mpctx) cas_terminal_owner(mpctx, NULL); } + mp_input_uninit(mpctx->input); + assert(!mpctx->num_abort_list); talloc_free(mpctx->abort_list); mp_mutex_destroy(&mpctx->abort_lock);