summaryrefslogtreecommitdiff
path: root/libavfilter/af_acrusher.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 12:28:23 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:01:02 +0200
commit69729a15f2d89d7a456191fd08945049a7146e03 (patch)
tree8cbd5cb103c67a01ef0a207ee9a7a2f9b3ce1cef /libavfilter/af_acrusher.c
parentf9c931cf1b8c6256b568c6970ef3a03e9cdc3f12 (diff)
avfilter/af_acrusher: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/af_acrusher.c')
-rw-r--r--libavfilter/af_acrusher.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/libavfilter/af_acrusher.c b/libavfilter/af_acrusher.c
index 88d6c644ad..14d66e88ea 100644
--- a/libavfilter/af_acrusher.c
+++ b/libavfilter/af_acrusher.c
@@ -263,25 +263,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return ff_filter_frame(outlink, out);
}
-static int query_formats(AVFilterContext *ctx)
-{
- static const enum AVSampleFormat sample_fmts[] = {
- AV_SAMPLE_FMT_DBL,
- AV_SAMPLE_FMT_NONE
- };
- int ret;
-
- 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 av_cold void uninit(AVFilterContext *ctx)
{
ACrusherContext *s = ctx->priv;
@@ -357,8 +338,8 @@ const AVFilter ff_af_acrusher = {
.priv_size = sizeof(ACrusherContext),
.priv_class = &acrusher_class,
.uninit = uninit,
- FILTER_QUERY_FUNC(query_formats),
FILTER_INPUTS(avfilter_af_acrusher_inputs),
FILTER_OUTPUTS(avfilter_af_acrusher_outputs),
+ FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL),
.process_command = process_command,
};