[FFmpeg-cvslog] avfilter/af_ladspa: process all channels for nb_handles > 1
Paul B Mahol
git at videolan.org
Wed Sep 16 14:52:56 CEST 2015
ffmpeg | branch: release/2.8 | Paul B Mahol <onemda at gmail.com> | Wed Sep 16 09:27:30 2015 +0000| [fb0d41932d4e377184a162bd66bf3009d38e950f] | committer: Paul B Mahol
avfilter/af_ladspa: process all channels for nb_handles > 1
Signed-off-by: Paul B Mahol <onemda at gmail.com>
(cherry picked from commit dc1050a3e8557fc423023036f698cc476fb675b4)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb0d41932d4e377184a162bd66bf3009d38e950f
---
libavfilter/af_ladspa.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 2057e6d..f89e2bc 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);
More information about the ffmpeg-cvslog
mailing list