From 2cce782527ca892124ec51dee417b9c565360178 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 Feb 2018 18:52:09 +0100 Subject: filter: adjust root log prefix Avoids that the audio decoder shows up with a "[root/ad]" log prefix. This is an annoying consequence of mp_log_new(): if a log parent doesn't have a prefix with "!", it'll add the prefix to all mp_logs created from it. This should probably be fixed in the mp_log code itself, but doing so would be a big deal as we'd have to make sure all the other log prefixes are what we want. So work it around for now. --- filters/filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/filters/filter.c b/filters/filter.c index c6c2603156..edde53541c 100644 --- a/filters/filter.c +++ b/filters/filter.c @@ -713,10 +713,11 @@ struct mp_filter *mp_filter_create_with_params(struct mp_filter_params *params) if (f->in->parent) { struct mp_filter_internal *parent = f->in->parent->in; MP_TARRAY_APPEND(parent, parent->children, parent->num_children, f); + f->log = mp_log_new(f, f->global->log, params->info->name); + } else { + f->log = mp_log_new(f, f->global->log, "!root"); } - f->log = mp_log_new(f, f->global->log, params->info->name); - if (f->in->info->init) { if (!f->in->info->init(f, params)) { talloc_free(f); -- cgit v1.2.3