summaryrefslogtreecommitdiffstats
path: root/audio/filter/af.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-20 14:44:44 +0200
committerwm4 <wm4@nowhere>2015-09-20 14:44:44 +0200
commit21e5e4da4baa92fab9e830ec5a62bbccdea85cf0 (patch)
tree1086c8b4490b7318a8dfe69542883d4bb215461c /audio/filter/af.c
parentbad743aed5a8fd22742317c344f126f04a0392ca (diff)
downloadmpv-21e5e4da4baa92fab9e830ec5a62bbccdea85cf0.tar.bz2
mpv-21e5e4da4baa92fab9e830ec5a62bbccdea85cf0.tar.xz
audio/filter: remove reentrancy flag
This flag was used by some filters and made sure none of these filters were inserted twice. This triggers only if the user explicitly tries to add multiple filters (and not e.g. due to auto-insertion), so at best this warned the user from doing something potentially pointless. At worst, it blocked some (mildly) legitimate use-cases. Get rid of it. Also see #2322.
Diffstat (limited to 'audio/filter/af.c')
-rw-r--r--audio/filter/af.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c
index 3f73ad9c58..62ba6a9665 100644
--- a/audio/filter/af.c
+++ b/audio/filter/af.c
@@ -159,24 +159,11 @@ static struct af_instance *af_create(struct af_stream *s, char *name,
MP_ERR(s, "Couldn't find audio filter '%s'.\n", name);
return NULL;
}
- const struct af_info *info = desc.p;
- /* Make sure that the filter is not already in the list if it is
- non-reentrant */
- if (info->flags & AF_FLAGS_NOT_REENTRANT) {
- for (struct af_instance *cur = s->first; cur; cur = cur->next) {
- if (cur->info == info) {
- MP_ERR(s, "There can only be one "
- "instance of the filter '%s' in each stream\n", name);
- return NULL;
- }
- }
- }
-
MP_VERBOSE(s, "Adding filter %s \n", name);
struct af_instance *af = talloc_zero(NULL, struct af_instance);
*af = (struct af_instance) {
- .info = info,
+ .info = desc.p,
.data = talloc_zero(af, struct mp_audio),
.log = mp_log_new(af, s->log, name),
.replaygain_data = s->replaygain_data,