avfilter/af_amerge: Remove always-false samplerate check

This filter uses ff_set_common_all_samplerates().
Also don't overwrite outlink->sample_rate in config_output;
it is harmless, because it is overwritten with the value it already
had, but it is an API violation.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-21 06:09:26 +02:00
parent 789de76e21
commit e1487deb19

View File

@ -151,17 +151,7 @@ static int config_output(AVFilterLink *outlink)
AVBPrint bp; AVBPrint bp;
int i; int i;
for (i = 1; i < s->nb_inputs; i++) {
if (ctx->inputs[i]->sample_rate != ctx->inputs[0]->sample_rate) {
av_log(ctx, AV_LOG_ERROR,
"Inputs must have the same sample rate "
"%d for in%d vs %d\n",
ctx->inputs[i]->sample_rate, i, ctx->inputs[0]->sample_rate);
return AVERROR(EINVAL);
}
}
s->bps = av_get_bytes_per_sample(ctx->outputs[0]->format); s->bps = av_get_bytes_per_sample(ctx->outputs[0]->format);
outlink->sample_rate = ctx->inputs[0]->sample_rate;
outlink->time_base = ctx->inputs[0]->time_base; outlink->time_base = ctx->inputs[0]->time_base;
av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC); av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);