1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

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:
wm4 2015-04-10 13:07:24 +02:00
parent be6cca7849
commit 46eb04f3c2

View File

@ -386,8 +386,6 @@ int mp_initialize(struct MPContext *mpctx, char **options)
assert(!mpctx->initialized);
update_logging(mpctx);
if (options) {
// Preparse the command line, so we can init the terminal early.
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");
}
update_logging(mpctx);
mp_print_version(mpctx->log, false);
mp_parse_cfgfiles(mpctx);