aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_aexciter.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-08-31 11:03:14 -0300
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:46 -0300
commit1f96db959c1235bb7079d354e09914a0a2608f62 (patch)
tree21ac480d5b148c0524761853e6badb3a90a7ca3f /libavfilter/af_aexciter.c
parent8a5896ec1f635ccf0d726f7ba7a06649ebeebf25 (diff)
downloadffmpeg-1f96db959c1235bb7079d354e09914a0a2608f62.tar.gz
avfilter: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/af_aexciter.c')
-rw-r--r--libavfilter/af_aexciter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/af_aexciter.c b/libavfilter/af_aexciter.c
index 5d76f290a0..8e829f992b 100644
--- a/libavfilter/af_aexciter.c
+++ b/libavfilter/af_aexciter.c
@@ -195,7 +195,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
dst = (double *)out->data[0];
for (int n = 0; n < in->nb_samples; n++) {
- for (int c = 0; c < inlink->channels; c++) {
+ for (int c = 0; c < inlink->ch_layout.nb_channels; c++) {
double sample = src[c] * level_in;
sample = distortion_process(s, &s->cp[c], sample);
@@ -208,8 +208,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
dst[c] = sample;
}
- src += inlink->channels;
- dst += inlink->channels;
+ src += inlink->ch_layout.nb_channels;
+ dst += inlink->ch_layout.nb_channels;
}
if (in != out)
@@ -231,11 +231,11 @@ static int config_input(AVFilterLink *inlink)
AExciterContext *s = ctx->priv;
if (!s->cp)
- s->cp = av_calloc(inlink->channels, sizeof(*s->cp));
+ s->cp = av_calloc(inlink->ch_layout.nb_channels, sizeof(*s->cp));
if (!s->cp)
return AVERROR(ENOMEM);
- for (int i = 0; i < inlink->channels; i++)
+ for (int i = 0; i < inlink->ch_layout.nb_channels; i++)
set_params(&s->cp[i], s->blend, s->drive, inlink->sample_rate,
s->freq, s->ceil);