summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-18 15:43:31 +0100
committerwm4 <wm4@nowhere>2013-12-20 21:07:57 +0100
commit591a6722d29ca21e8bb62dbd01792590e8548dec (patch)
tree49b2c9091141ba868ac0d1f70cf00d833895e4db /common
parent78292058ccf3fb827c9acc8ab3f616fa78a7a1e5 (diff)
downloadmpv-591a6722d29ca21e8bb62dbd01792590e8548dec.tar.bz2
mpv-591a6722d29ca21e8bb62dbd01792590e8548dec.tar.xz
msg: change hack to silence command line pre-parse error messages
mp_msg_levels[] will go away.
Diffstat (limited to 'common')
-rw-r--r--common/msg.c3
-rw-r--r--common/msg.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/common/msg.c b/common/msg.c
index 49a94ba7b5..9ef20226f6 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -59,6 +59,7 @@ static struct mp_log *legacy_logs[MSGT_MAX];
int mp_msg_levels[MSGT_MAX]; // verbose level of this module. initialized to -2
int mp_msg_level_all = MSGL_STATUS;
int verbose = 0;
+bool mp_msg_mute;
int mp_msg_color = 1;
int mp_msg_module = 0;
int mp_msg_cancolor = 0;
@@ -79,6 +80,8 @@ static void mp_msg_do_init(void){
int mp_msg_test(int mod, int lev)
{
+ if (mp_msg_mute)
+ return false;
if (lev == MSGL_STATUS) {
// skip status line output if stderr is a tty but in background
if (terminal_in_background())
diff --git a/common/msg.h b/common/msg.h
index 8466e7e2b6..c564df9e4f 100644
--- a/common/msg.h
+++ b/common/msg.h
@@ -28,8 +28,8 @@
struct mp_log;
-// defined in mplayer.c
extern int verbose;
+extern bool mp_msg_mute;
// verbosity elevel: