mirror of https://github.com/mpv-player/mpv
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:
parent
8ee25db71f
commit
c1282d4d43
|
@ -184,16 +184,17 @@ void mp_destroy(struct MPContext *mpctx)
|
||||||
cocoa_set_input_context(NULL);
|
cocoa_set_input_context(NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (cas_terminal_owner(mpctx, mpctx)) {
|
|
||||||
terminal_uninit();
|
|
||||||
cas_terminal_owner(mpctx, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
mp_input_uninit(mpctx->input);
|
mp_input_uninit(mpctx->input);
|
||||||
|
|
||||||
uninit_libav(mpctx->global);
|
uninit_libav(mpctx->global);
|
||||||
|
|
||||||
mp_msg_uninit(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);
|
assert(!mpctx->num_abort_list);
|
||||||
talloc_free(mpctx->abort_list);
|
talloc_free(mpctx->abort_list);
|
||||||
mp_mutex_destroy(&mpctx->abort_lock);
|
mp_mutex_destroy(&mpctx->abort_lock);
|
||||||
|
|
Loading…
Reference in New Issue