mirror of https://github.com/mpv-player/mpv
player: do not accidentally init terminal
Starting the command line player with --no-terminal, the terminal was sitll initialized. This happened because update_logging() used the option value before the options were parsed. Fix by moving down the initialization to before the point where it's actually needed.
This commit is contained in:
parent
be6cca7849
commit
46eb04f3c2
|
@ -386,8 +386,6 @@ int mp_initialize(struct MPContext *mpctx, char **options)
|
||||||
|
|
||||||
assert(!mpctx->initialized);
|
assert(!mpctx->initialized);
|
||||||
|
|
||||||
update_logging(mpctx);
|
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
// Preparse the command line, so we can init the terminal early.
|
// Preparse the command line, so we can init the terminal early.
|
||||||
m_config_preparse_command_line(mpctx->mconfig, mpctx->global, options);
|
m_config_preparse_command_line(mpctx->mconfig, mpctx->global, options);
|
||||||
|
@ -400,6 +398,7 @@ int mp_initialize(struct MPContext *mpctx, char **options)
|
||||||
MP_VERBOSE(mpctx, "\n");
|
MP_VERBOSE(mpctx, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_logging(mpctx);
|
||||||
mp_print_version(mpctx->log, false);
|
mp_print_version(mpctx->log, false);
|
||||||
|
|
||||||
mp_parse_cfgfiles(mpctx);
|
mp_parse_cfgfiles(mpctx);
|
||||||
|
|
Loading…
Reference in New Issue