summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-06-25 16:53:27 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:11:43 +0200
commit6142e86b842ece14ab2652ab9f8b6f177fe998e5 (patch)
tree75bdac2dea39393169d18413415e159216a7e7fc
parent1ada0b4c6fee375eede6e0d0659a8fadb6fdf42c (diff)
downloadmpv-6142e86b842ece14ab2652ab9f8b6f177fe998e5.tar.bz2
mpv-6142e86b842ece14ab2652ab9f8b6f177fe998e5.tar.xz
af_ladspa: Fix multiple instances of a filter type
Ensure that activate is called on each filter instance, even if we have e.g. multiple mono filters handling a multichannel file. Fixes one of the bugs reported as bug #1685. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31558 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libaf/af_ladspa.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libaf/af_ladspa.c b/libaf/af_ladspa.c
index bab44191be..ace8302b54 100644
--- a/libaf/af_ladspa.c
+++ b/libaf/af_ladspa.c
@@ -833,12 +833,11 @@ static af_data_t* play(struct af_instance_s *af, af_data_t *data) {
/* Activate filter (if it isn't already :) ) */
- if ( (pdes->activate) && (setup->activated == 0) ) {
+ if (pdes->activate && !setup->activated && i % setup->ninputs == 0)
pdes->activate(setup->chhandles[i]);
- setup->activated = 1;
- }
} /* All channels/filters done! except for... */
+ setup->activated = 1;
/* Stereo effect with one channel left. Use same buffer for left
* and right. connect it to the second port.