diff mbox series

[FFmpeg-devel,007/218] avfilter/af_acrusher: Store format in filter, remove query function

Message ID PR3PR03MB66656AB04F13D9DA43F37DA88FAA9@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 69729a15f2d89d7a456191fd08945049a7146e03
Headers show
Series [FFmpeg-devel,001/218] avfilter/f_reverse: Don't use redundant query_formats function
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 30, 2021, 1:39 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/af_acrusher.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)
diff mbox series

Patch

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,
 };