[FFmpeg-devel] [PATCH 035/218] avfilter/af_compensationdelay: Store format in filter, remove query func

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


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

diff --git a/libavfilter/af_compensationdelay.c b/libavfilter/af_compensationdelay.c
index ff6f640370..6a58fd21bd 100644
--- a/libavfilter/af_compensationdelay.c
+++ b/libavfilter/af_compensationdelay.c
@@ -63,23 +63,6 @@ AVFILTER_DEFINE_CLASS(compensationdelay);
 // The maximum delay may be reached by this filter
 #define COMP_DELAY_MAX_DELAY               (COMP_DELAY_MAX_DISTANCE * COMP_DELAY_SOUND_FRONT_DELAY(50))
 
-static int query_formats(AVFilterContext *ctx)
-{
-    static const enum AVSampleFormat sample_fmts[] = {
-        AV_SAMPLE_FMT_DBLP,
-        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 int config_input(AVFilterLink *inlink)
 {
     AVFilterContext *ctx = inlink->dst;
@@ -179,5 +162,5 @@ const AVFilter ff_af_compensationdelay = {
     .uninit        = uninit,
     FILTER_INPUTS(compensationdelay_inputs),
     FILTER_OUTPUTS(compensationdelay_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP),
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list