player/main: uninit input after terminal uninit

The terminal input thread holds the input_ctx reference.
Fixes: c1282d4d43
This commit is contained in:
nanahi 2024-09-08 09:35:40 -04:00 committed by Kacper Michajłow
parent e169302e2d
commit f92d5da89c
1 changed files with 2 additions and 2 deletions

View File

@ -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);