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_asdr.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_asdr.c')
-rw-r--r-- | libavfilter/af_asdr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/af_asdr.c b/libavfilter/af_asdr.c index addfe5f158..a40246f280 100644 --- a/libavfilter/af_asdr.c +++ b/libavfilter/af_asdr.c @@ -41,7 +41,7 @@ static void sdr(AVFilterContext *ctx, const AVFrame *u, const AVFrame *v) { AudioSDRContext *s = ctx->priv; - for (int ch = 0; ch < u->channels; ch++) { + for (int ch = 0; ch < u->ch_layout.nb_channels; ch++) { const double *const us = (double *)u->extended_data[ch]; const double *const vs = (double *)v->extended_data[ch]; double sum_uv = s->sum_uv[ch]; @@ -117,10 +117,10 @@ static int config_output(AVFilterLink *outlink) s->pts = AV_NOPTS_VALUE; - s->channels = inlink->channels; + s->channels = inlink->ch_layout.nb_channels; - s->sum_u = av_calloc(outlink->channels, sizeof(*s->sum_u)); - s->sum_uv = av_calloc(outlink->channels, sizeof(*s->sum_uv)); + s->sum_u = av_calloc(outlink->ch_layout.nb_channels, sizeof(*s->sum_u)); + s->sum_uv = av_calloc(outlink->ch_layout.nb_channels, sizeof(*s->sum_uv)); if (!s->sum_u || !s->sum_uv) return AVERROR(ENOMEM); |