diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-21 06:09:26 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-21 17:56:21 +0200 |
commit | 789de76e211cae398b16829f45b65a520059ddb8 (patch) | |
tree | ab1c50ea98dba51c3e993881c42dd58b5aae87db /libavfilter | |
parent | 7d995078386793e0aeeedeb7803001ed8758b30b (diff) | |
download | ffmpeg-789de76e211cae398b16829f45b65a520059ddb8.tar.gz |
avfilter/af_agate: 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>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_agate.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c index 8e5cca4228..5de2cc0f0e 100644 --- a/libavfilter/af_agate.c +++ b/libavfilter/af_agate.c @@ -357,15 +357,6 @@ static int scconfig_output(AVFilterLink *outlink) AVFilterContext *ctx = outlink->src; AudioGateContext *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); |