aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-09-16 09:27:30 +0000
committerPaul B Mahol <onemda@gmail.com>2015-09-16 12:50:13 +0000
commitfb0d41932d4e377184a162bd66bf3009d38e950f (patch)
treed5f7d87d8a6c6f099525e23c9ba5ff167a360bb4
parentaa46ae8848ef871c093099bbee8b52ef73ea7b9c (diff)
downloadffmpeg-fb0d41932d4e377184a162bd66bf3009d38e950f.tar.gz
avfilter/af_ladspa: process all channels for nb_handles > 1
Signed-off-by: Paul B Mahol <onemda@gmail.com> (cherry picked from commit dc1050a3e8557fc423023036f698cc476fb675b4)
-rw-r--r--libavfilter/af_ladspa.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 2057e6d0ef..f89e2bc16b 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -142,7 +142,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterContext *ctx = inlink->dst;
LADSPAContext *s = ctx->priv;
AVFrame *out;
- int i, h;
+ int i, h, p;
if (!s->nb_outputs ||
(av_frame_is_writable(in) && s->nb_inputs == s->nb_outputs &&
@@ -159,13 +159,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (h = 0; h < s->nb_handles; h++) {
for (i = 0; i < s->nb_inputs; i++) {
+ p = s->nb_handles > 1 ? h : i;
s->desc->connect_port(s->handles[h], s->ipmap[i],
- (LADSPA_Data*)in->extended_data[i]);
+ (LADSPA_Data*)in->extended_data[p]);
}
for (i = 0; i < s->nb_outputs; i++) {
+ p = s->nb_handles > 1 ? h : i;
s->desc->connect_port(s->handles[h], s->opmap[i],
- (LADSPA_Data*)out->extended_data[i]);
+ (LADSPA_Data*)out->extended_data[p]);
}
s->desc->run(s->handles[h], in->nb_samples);