0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-19 19:42:24 +02:00

player/main: move terminal_uninit to the end

It is strange to do terminal_uninit() and still use terminal after. Even
tho it has no side-effects.
This commit is contained in:
Kacper Michajłow 2024-03-17 12:52:38 +01:00
parent 8ee25db71f
commit c1282d4d43

View File

@ -184,16 +184,17 @@ void mp_destroy(struct MPContext *mpctx)
cocoa_set_input_context(NULL);
#endif
if (cas_terminal_owner(mpctx, mpctx)) {
terminal_uninit();
cas_terminal_owner(mpctx, NULL);
}
mp_input_uninit(mpctx->input);
uninit_libav(mpctx->global);
mp_msg_uninit(mpctx->global);
if (cas_terminal_owner(mpctx, mpctx)) {
terminal_uninit();
cas_terminal_owner(mpctx, NULL);
}
assert(!mpctx->num_abort_list);
talloc_free(mpctx->abort_list);
mp_mutex_destroy(&mpctx->abort_lock);