From 7d424b4ce45534ade52f38df68308498decc0171 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 25 Mar 2017 17:07:40 +0100 Subject: command: add better runtime filter toggling method Basically, see the example in input.rst. This is better than the "old" vf-toggle method, because it doesn't require the user to duplicate the filter string in mpv.conf and input.conf. Some aspects of this changes are untested, so enjoy your alpha testing. --- audio/filter/af.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'audio/filter') diff --git a/audio/filter/af.c b/audio/filter/af.c index 31f4e45614..84ee377136 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -78,6 +78,7 @@ static bool get_desc(struct m_obj_desc *dst, int index) const struct m_obj_list af_obj_list = { .get_desc = get_desc, .description = "audio filters", + .allow_disable_entries = true, .aliases = { {"force", "format"}, {0} @@ -545,6 +546,8 @@ int af_init(struct af_stream *s) // Add all filters in the list (if there are any) struct m_obj_settings *list = s->opts->af_settings; for (int i = 0; list && list[i].name; i++) { + if (!list[i].enabled) + continue; struct af_instance *af = af_prepend(s, s->last, list[i].name, list[i].attribs); if (!af) { -- cgit v1.2.3