summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 23:11:12 +0100
committerwm4 <wm4@nowhere>2013-12-21 23:11:12 +0100
commit245e5b844177e9ad9a9c07eff5efab7c3fccdebc (patch)
treeb70f214f8c3fc802d6d6edbf8395273c854ac0fd /player/main.c
parent678ce04b3f7b7af845f77981fd0056845afa37fe (diff)
downloadmpv-245e5b844177e9ad9a9c07eff5efab7c3fccdebc.tar.bz2
mpv-245e5b844177e9ad9a9c07eff5efab7c3fccdebc.tar.xz
msg: remove global state
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c7
1 files changed, 6 insertions, 1 deletions
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);