Without that test, ff_bufqueue_add silently discards the
oldest buffer, that leaves in[i].nb_samples inconsistent,
and causes later a segfault.
if (inlink == ctx->inputs[input_number])
break;
av_assert1(input_number < am->nb_inputs);
+ if (ff_bufqueue_is_full(&am->in[input_number].queue)) {
+ av_log(ctx, AV_LOG_ERROR, "Buffer queue overflow\n");
+ avfilter_unref_buffer(insamples);
+ return AVERROR(ENOMEM);
+ }
ff_bufqueue_add(ctx, &am->in[input_number].queue, insamples);
am->in[input_number].nb_samples += insamples->audio->nb_samples;
nb_samples = am->in[0].nb_samples;