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_axcorrelate.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_axcorrelate.c')
-rw-r--r-- | libavfilter/af_axcorrelate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/af_axcorrelate.c b/libavfilter/af_axcorrelate.c index d0a91cd836..9be3f1c921 100644 --- a/libavfilter/af_axcorrelate.c +++ b/libavfilter/af_axcorrelate.c @@ -113,7 +113,7 @@ static int xcorrelate_slow_##suffix(AVFilterContext *ctx, \ const int size = FFMIN(available, s->size); \ int used; \ \ - for (int ch = 0; ch < out->channels; ch++) { \ + for (int ch = 0; ch < out->ch_layout.nb_channels; ch++) { \ const type *x = (const type *)s->cache[0]->extended_data[ch]; \ const type *y = (const type *)s->cache[1]->extended_data[ch]; \ type *sumx = (type *)s->mean_sum[0]->extended_data[ch]; \ @@ -155,7 +155,7 @@ static int xcorrelate_fast_##suffix(AVFilterContext *ctx, AVFrame *out, \ const int size = FFMIN(available, s->size); \ int used; \ \ - for (int ch = 0; ch < out->channels; ch++) { \ + for (int ch = 0; ch < out->ch_layout.nb_channels; ch++) { \ const type *x = (const type *)s->cache[0]->extended_data[ch]; \ const type *y = (const type *)s->cache[1]->extended_data[ch]; \ type *num_sum = (type *)s->num_sum->extended_data[ch]; \ @@ -299,8 +299,8 @@ static int config_output(AVFilterLink *outlink) s->pts = AV_NOPTS_VALUE; - s->fifo[0] = av_audio_fifo_alloc(outlink->format, outlink->channels, s->size); - s->fifo[1] = av_audio_fifo_alloc(outlink->format, outlink->channels, s->size); + s->fifo[0] = av_audio_fifo_alloc(outlink->format, outlink->ch_layout.nb_channels, s->size); + s->fifo[1] = av_audio_fifo_alloc(outlink->format, outlink->ch_layout.nb_channels, s->size); if (!s->fifo[0] || !s->fifo[1]) return AVERROR(ENOMEM); |