diff options
author | wm4 <wm4@nowhere> | 2015-04-10 13:07:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-10 13:07:24 +0200 |
commit | 46eb04f3c26a14a738ae1c09f341f322cae4371d (patch) | |
tree | 5a845a0a1e4c5174f9a8b03bfb84482204fefe38 | |
parent | be6cca78491a949e3892a4c2edc2f4fcfc5e8145 (diff) | |
download | mpv-46eb04f3c26a14a738ae1c09f341f322cae4371d.tar.bz2 mpv-46eb04f3c26a14a738ae1c09f341f322cae4371d.tar.xz |
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.
-rw-r--r-- | player/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/player/main.c b/player/main.c index 77ec8053d5..0c5d39fdf8 100644 --- a/player/main.c +++ b/player/main.c @@ -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); |