diff options
-rw-r--r-- | common/msg.c | 11 | ||||
-rw-r--r-- | common/msg_control.h | 1 | ||||
-rw-r--r-- | options/parse_commandline.c | 5 |
3 files changed, 1 insertions, 16 deletions
diff --git a/common/msg.c b/common/msg.c index 34ed677a22..3a441d0bcf 100644 --- a/common/msg.c +++ b/common/msg.c @@ -61,8 +61,6 @@ struct mp_log_root { int num_buffers; FILE *log_file; FILE *stats_file; - // --- semi-atomic access - bool mute; // --- must be accessed atomically /* This is incremented every time the msglevels must be reloaded. * (This is perhaps better than maintaining a globally accessible and @@ -133,7 +131,7 @@ static void update_loglevel(struct mp_log *log) bool mp_msg_test(struct mp_log *log, int lev) { struct mp_log_root *root = log->root; - if (!root || root->mute) + if (!root) return false; if (atomic_load_explicit(&log->reload_counter, memory_order_relaxed) != atomic_load_explicit(&root->reload_counter, memory_order_relaxed)) @@ -486,13 +484,6 @@ void mp_msg_update_msglevels(struct mpv_global *global) pthread_mutex_unlock(&mp_msg_lock); } -void mp_msg_mute(struct mpv_global *global, bool mute) -{ - struct mp_log_root *root = global->log->root; - - root->mute = mute; -} - void mp_msg_force_stderr(struct mpv_global *global, bool force_stderr) { struct mp_log_root *root = global->log->root; diff --git a/common/msg_control.h b/common/msg_control.h index 2e1a4ec6bd..c26a557c9e 100644 --- a/common/msg_control.h +++ b/common/msg_control.h @@ -7,7 +7,6 @@ struct mpv_global; void mp_msg_init(struct mpv_global *global); void mp_msg_uninit(struct mpv_global *global); void mp_msg_update_msglevels(struct mpv_global *global); -void mp_msg_mute(struct mpv_global *global, bool mute); void mp_msg_force_stderr(struct mpv_global *global, bool force_stderr); bool mp_msg_has_status_line(struct mpv_global *global); diff --git a/options/parse_commandline.c b/options/parse_commandline.c index 5145a8c03b..ab1f28f72b 100644 --- a/options/parse_commandline.c +++ b/options/parse_commandline.c @@ -285,9 +285,6 @@ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *globa { struct MPOpts *opts = global->opts; - // Hack to shut up parser error messages - mp_msg_mute(global, true); - struct parse_state p = {config, argv}; while (split_opt_silent(&p) == 0) { if (p.is_opt) { @@ -300,8 +297,6 @@ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *globa } } - mp_msg_mute(global, false); - for (int n = 0; n < config->num_opts; n++) config->opts[n].warning_was_printed = false; } |