Commit 910215b4 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avfilter/af_sidechaincompress: 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: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent e1487deb
...@@ -323,15 +323,6 @@ static int config_output(AVFilterLink *outlink) ...@@ -323,15 +323,6 @@ static int config_output(AVFilterLink *outlink)
AVFilterContext *ctx = outlink->src; AVFilterContext *ctx = outlink->src;
SidechainCompressContext *s = ctx->priv; SidechainCompressContext *s = ctx->priv;
if (ctx->inputs[0]->sample_rate != ctx->inputs[1]->sample_rate) {
av_log(ctx, AV_LOG_ERROR,
"Inputs must have the same sample rate "
"%d for in0 vs %d for in1\n",
ctx->inputs[0]->sample_rate, ctx->inputs[1]->sample_rate);
return AVERROR(EINVAL);
}
outlink->sample_rate = ctx->inputs[0]->sample_rate;
outlink->time_base = ctx->inputs[0]->time_base; outlink->time_base = ctx->inputs[0]->time_base;
s->fifo[0] = av_audio_fifo_alloc(ctx->inputs[0]->format, ctx->inputs[0]->channels, 1024); s->fifo[0] = av_audio_fifo_alloc(ctx->inputs[0]->format, ctx->inputs[0]->channels, 1024);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment