From 46eb04f3c26a14a738ae1c09f341f322cae4371d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Apr 2015 13:07:24 +0200 Subject: 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. --- player/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'player') 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); -- cgit v1.2.3