aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 13:10:11 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:01:03 +0200
commit174e7f85095afef444504a5fad0e694d468d3e13 (patch)
treec54f2c5ec36614576878a8d51356c8d4c24831ba
parent88a92cb754ed38ee7ea0cb5cfa3a521aba3cbd27 (diff)
downloadffmpeg-174e7f85095afef444504a5fad0e694d468d3e13.tar.gz
avfilter/af_sidechaincompress: Store format in filter, remove query func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavfilter/af_sidechaincompress.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c
index 7359ba8e7e..c0ce82066b 100644
--- a/libavfilter/af_sidechaincompress.c
+++ b/libavfilter/af_sidechaincompress.c
@@ -406,23 +406,6 @@ static int acompressor_filter_frame(AVFilterLink *inlink, AVFrame *in)
return ff_filter_frame(outlink, out);
}
-static int acompressor_query_formats(AVFilterContext *ctx)
-{
- static const enum AVSampleFormat sample_fmts[] = {
- AV_SAMPLE_FMT_DBL,
- AV_SAMPLE_FMT_NONE
- };
- int ret = ff_set_common_all_channel_counts(ctx);
- if (ret < 0)
- return ret;
-
- ret = ff_set_common_formats_from_list(ctx, sample_fmts);
- if (ret < 0)
- return ret;
-
- return ff_set_common_all_samplerates(ctx);
-}
-
static const AVFilterPad acompressor_inputs[] = {
{
.name = "default",
@@ -446,7 +429,7 @@ const AVFilter ff_af_acompressor = {
.priv_size = sizeof(SidechainCompressContext),
FILTER_INPUTS(acompressor_inputs),
FILTER_OUTPUTS(acompressor_outputs),
- FILTER_QUERY_FUNC(acompressor_query_formats),
+ FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL),
.process_command = process_command,
};
#endif /* CONFIG_ACOMPRESSOR_FILTER */