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_afade.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_afade.c')
-rw-r--r-- | libavfilter/af_afade.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index c57709050e..e31467ee2b 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -289,7 +289,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) if ((!s->type && (cur_sample + nb_samples < s->start_sample)) || ( s->type && (s->start_sample + s->nb_samples < cur_sample))) { av_samples_set_silence(out_buf->extended_data, 0, nb_samples, - out_buf->channels, out_buf->format); + out_buf->ch_layout.nb_channels, out_buf->format); } else { int64_t start; @@ -299,7 +299,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) start = s->start_sample + s->nb_samples - cur_sample; s->fade_samples(out_buf->extended_data, buf->extended_data, - nb_samples, buf->channels, + nb_samples, buf->ch_layout.nb_channels, s->type ? -1 : 1, start, s->nb_samples, s->curve); } @@ -502,7 +502,7 @@ static int activate(AVFilterContext *ctx) s->crossfade_samples(out->extended_data, cf[0]->extended_data, cf[1]->extended_data, - s->nb_samples, out->channels, + s->nb_samples, out->ch_layout.nb_channels, s->curve, s->curve2); out->pts = s->pts; s->pts += av_rescale_q(s->nb_samples, @@ -523,7 +523,7 @@ static int activate(AVFilterContext *ctx) } s->fade_samples(out->extended_data, cf[0]->extended_data, s->nb_samples, - outlink->channels, -1, s->nb_samples - 1, s->nb_samples, s->curve); + outlink->ch_layout.nb_channels, -1, s->nb_samples - 1, s->nb_samples, s->curve); out->pts = s->pts; s->pts += av_rescale_q(s->nb_samples, (AVRational){ 1, outlink->sample_rate }, outlink->time_base); @@ -543,7 +543,7 @@ static int activate(AVFilterContext *ctx) } s->fade_samples(out->extended_data, cf[1]->extended_data, s->nb_samples, - outlink->channels, 1, 0, s->nb_samples, s->curve2); + outlink->ch_layout.nb_channels, 1, 0, s->nb_samples, s->curve2); out->pts = s->pts; s->pts += av_rescale_q(s->nb_samples, (AVRational){ 1, outlink->sample_rate }, outlink->time_base); |