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/avf_abitscope.c | |
parent | 8a5896ec1f635ccf0d726f7ba7a06649ebeebf25 (diff) |
avfilter: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/avf_abitscope.c')
-rw-r--r-- | libavfilter/avf_abitscope.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/avf_abitscope.c b/libavfilter/avf_abitscope.c index 1db7f77a5b..58e2bdaf61 100644 --- a/libavfilter/avf_abitscope.c +++ b/libavfilter/avf_abitscope.c @@ -107,7 +107,7 @@ static int config_input(AVFilterLink *inlink) char *colors, *saveptr = NULL; s->nb_samples = FFMAX(1, av_rescale(inlink->sample_rate, s->frame_rate.den, s->frame_rate.num)); - s->nb_channels = inlink->channels; + s->nb_channels = inlink->ch_layout.nb_channels; s->depth = inlink->format == AV_SAMPLE_FMT_S16P ? 16 : 32; s->fg = av_malloc_array(s->nb_channels, 4 * sizeof(*s->fg)); @@ -148,9 +148,9 @@ static int config_output(AVFilterLink *outlink) } #define BARS(type, depth, one) \ - for (int ch = 0; ch < inlink->channels; ch++) { \ + for (int ch = 0; ch < inlink->ch_layout.nb_channels; ch++) { \ const type *in = (const type *)insamples->extended_data[ch]; \ - const int w = outpicref->width / inlink->channels; \ + const int w = outpicref->width / inlink->ch_layout.nb_channels; \ const int h = outpicref->height / depth; \ const uint32_t color = AV_RN32(&s->fg[4 * ch]); \ \ @@ -175,8 +175,8 @@ static int config_output(AVFilterLink *outlink) } #define DO_TRACE(type, depth, one) \ - for (int ch = 0; ch < inlink->channels; ch++) { \ - const int w = outpicref->width / inlink->channels; \ + for (int ch = 0; ch < inlink->ch_layout.nb_channels; ch++) { \ + const int w = outpicref->width / inlink->ch_layout.nb_channels; \ const type *in = (const type *)insamples->extended_data[ch]; \ const int wb = w / depth; \ int wv; \ |