[FFmpeg-devel] [PATCH 011/218] avfilter/af_adenorm: Use formats list instead of query function

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Sep 30 16:39:12 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavfilter/af_adenorm.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/libavfilter/af_adenorm.c b/libavfilter/af_adenorm.c
index 2cac605a2a..3ad1e7f594 100644
--- a/libavfilter/af_adenorm.c
+++ b/libavfilter/af_adenorm.c
@@ -43,23 +43,6 @@ typedef struct ADenormContext {
                    const void *src, int nb_samples);
 } ADenormContext;
 
-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 = ff_set_common_formats_from_list(ctx, sample_fmts);
-    if (ret < 0)
-        return ret;
-
-    ret = ff_set_common_all_channel_counts(ctx);
-    if (ret < 0)
-        return ret;
-
-    return ff_set_common_all_samplerates(ctx);
-}
-
 static void dc_denorm_fltp(AVFilterContext *ctx, void *dstp,
                            const void *srcp, int nb_samples)
 {
@@ -310,7 +293,7 @@ const AVFilter ff_af_adenorm = {
     .priv_size       = sizeof(ADenormContext),
     FILTER_INPUTS(adenorm_inputs),
     FILTER_OUTPUTS(adenorm_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP),
     .priv_class      = &adenorm_class,
     .process_command = process_command,
     .flags           = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC |
-- 
2.30.2



More information about the ffmpeg-devel mailing list