From 245e5b844177e9ad9a9c07eff5efab7c3fccdebc Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 23:11:12 +0100 Subject: msg: remove global state --- player/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'player') diff --git a/player/main.c b/player/main.c index 1844746650..5183f56ea3 100644 --- a/player/main.c +++ b/player/main.c @@ -312,6 +312,11 @@ static int mpv_main(int argc, char *argv[]) struct MPOpts *opts = mpctx->opts; mpctx->global->opts = opts; + char *verbose_env = getenv("MPV_VERBOSE"); + if (verbose_env) + opts->verbose = atoi(verbose_env); + mp_msg_update_msglevels(mpctx->global); + init_libav(mpctx->global); GetCpuCaps(&gCpuCaps); screenshot_init(mpctx); @@ -319,7 +324,7 @@ static int mpv_main(int argc, char *argv[]) command_init(mpctx); // Preparse the command line - m_config_preparse_command_line(mpctx->mconfig, argc, argv); + m_config_preparse_command_line(mpctx->mconfig, mpctx->global, argc, argv); mp_msg_update_msglevels(mpctx->global); mp_print_version(mpctx->log, false); -- cgit v1.2.3