aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-21 06:09:26 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-21 17:56:30 +0200
commit910215b4db2bb42a2bdca53a4f7bf455f764aa9b (patch)
tree8b7a818b301747617faa933d93ac9320c52ea90b
parente1487deb19d218b7f954d675e2603d26b9e0d97e (diff)
downloadffmpeg-910215b4db2bb42a2bdca53a4f7bf455f764aa9b.tar.gz
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: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavfilter/af_sidechaincompress.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c
index af4a90ea09..22a86ae2a7 100644
--- a/libavfilter/af_sidechaincompress.c
+++ b/libavfilter/af_sidechaincompress.c
@@ -323,15 +323,6 @@ static int config_output(AVFilterLink *outlink)
AVFilterContext *ctx = outlink->src;
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;
s->fifo[0] = av_audio_fifo_alloc(ctx->inputs[0]->format, ctx->inputs[0]->channels, 1024);