diff options
author | James Almer <jamrial@gmail.com> | 2021-08-31 11:03:14 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:46 -0300 |
commit | 1f96db959c1235bb7079d354e09914a0a2608f62 (patch) | |
tree | 21ac480d5b148c0524761853e6badb3a90a7ca3f /libavfilter/af_flanger.c | |
parent | 8a5896ec1f635ccf0d726f7ba7a06649ebeebf25 (diff) | |
download | ffmpeg-1f96db959c1235bb7079d354e09914a0a2608f62.tar.gz |
avfilter: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/af_flanger.c')
-rw-r--r-- | libavfilter/af_flanger.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/af_flanger.c b/libavfilter/af_flanger.c index ba8d033ce8..452436a4b6 100644 --- a/libavfilter/af_flanger.c +++ b/libavfilter/af_flanger.c @@ -95,7 +95,7 @@ static int config_input(AVFilterLink *inlink) s->max_samples = (s->delay_min + s->delay_depth) * inlink->sample_rate + 2.5; s->lfo_length = inlink->sample_rate / s->speed; - s->delay_last = av_calloc(inlink->channels, sizeof(*s->delay_last)); + s->delay_last = av_calloc(inlink->ch_layout.nb_channels, sizeof(*s->delay_last)); s->lfo = av_calloc(s->lfo_length, sizeof(*s->lfo)); if (!s->lfo || !s->delay_last) return AVERROR(ENOMEM); @@ -105,7 +105,7 @@ static int config_input(AVFilterLink *inlink) s->max_samples - 2., 3 * M_PI_2); return av_samples_alloc_array_and_samples(&s->delay_buffer, NULL, - inlink->channels, s->max_samples, + inlink->ch_layout.nb_channels, s->max_samples, inlink->format, 0); } @@ -131,7 +131,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) s->delay_buf_pos = (s->delay_buf_pos + s->max_samples - 1) % s->max_samples; - for (chan = 0; chan < inlink->channels; chan++) { + for (chan = 0; chan < inlink->ch_layout.nb_channels; chan++) { double *src = (double *)frame->extended_data[chan]; double *dst = (double *)out_frame->extended_data[chan]; double delayed_0, delayed_1; |