diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 3e5e7ee118..0e32c8affb 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -235,7 +235,7 @@ static int config_output(AVFilterLink *outlink) if (!s->fifos) return AVERROR(ENOMEM); - s->nb_channels = av_get_channel_layout_nb_channels(outlink->channel_layout); + s->nb_channels = outlink->channels; for (i = 0; i < s->nb_inputs; i++) { s->fifos[i] = av_audio_fifo_alloc(outlink->format, s->nb_channels, 1024); if (!s->fifos[i])