mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
4107a8be6c
commit
2cce782527
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue