diff options
author | wm4 <wm4@nowhere> | 2018-02-12 18:52:09 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-02-13 17:45:29 -0800 |
commit | 2cce782527ca892124ec51dee417b9c565360178 (patch) | |
tree | 30d47bd6082bcafeb8a6a2d92da881d2e931e973 /filters | |
parent | 4107a8be6ccd843378414704e69225168e3494f9 (diff) | |
download | mpv-2cce782527ca892124ec51dee417b9c565360178.tar.bz2 mpv-2cce782527ca892124ec51dee417b9c565360178.tar.xz |
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.
Diffstat (limited to 'filters')
-rw-r--r-- | filters/filter.c | 5 |
1 files 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); |