mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/af_ladspa: process all channels for nb_handles > 1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
03f34e0d3c
commit
dc1050a3e8
@ -142,7 +142,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
LADSPAContext *s = ctx->priv;
|
LADSPAContext *s = ctx->priv;
|
||||||
AVFrame *out;
|
AVFrame *out;
|
||||||
int i, h;
|
int i, h, p;
|
||||||
|
|
||||||
if (!s->nb_outputs ||
|
if (!s->nb_outputs ||
|
||||||
(av_frame_is_writable(in) && s->nb_inputs == 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 (h = 0; h < s->nb_handles; h++) {
|
||||||
for (i = 0; i < s->nb_inputs; i++) {
|
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],
|
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++) {
|
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],
|
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);
|
s->desc->run(s->handles[h], in->nb_samples);
|
||||||
|
Loading…
Reference in New Issue
Block a user