diff mbox series

[FFmpeg-devel,006/218] avfilter/af_crossover: Use formats list instead of query function

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

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_acrossover.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c
index 1ba847d31b..9c00e1ddc2 100644
--- a/libavfilter/af_acrossover.c
+++ b/libavfilter/af_acrossover.c
@@ -301,25 +301,6 @@  static void calc_q_factors(int order, double *q)
         q[i] = 1. / (-2. * cos(M_PI * (2. * (i + 1) + n - 1.) / (2. * n)));
 }
 
-static int query_formats(AVFilterContext *ctx)
-{
-    static const enum AVSampleFormat sample_fmts[] = {
-        AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP,
-        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);
-}
-
 #define BIQUAD_PROCESS(name, type)                             \
 static void biquad_process_## name(const type *const c,        \
                                    type *b,                    \
@@ -559,9 +540,9 @@  const AVFilter ff_af_acrossover = {
     .priv_class     = &acrossover_class,
     .init           = init,
     .uninit         = uninit,
-    FILTER_QUERY_FUNC(query_formats),
     FILTER_INPUTS(inputs),
     .outputs        = NULL,
+    FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP),
     .flags          = AVFILTER_FLAG_DYNAMIC_OUTPUTS |
                       AVFILTER_FLAG_SLICE_THREADS,
 };