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
This commit is contained in:
reimar 2010-06-25 16:53:27 +00:00 committed by Uoti Urpala
parent 1ada0b4c6f
commit 6142e86b84
1 changed files with 2 additions and 3 deletions

View File

@ -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.