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

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


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

diff --git a/libavfilter/af_axcorrelate.c b/libavfilter/af_axcorrelate.c
index 1d9c805b29..8c5c429127 100644
--- a/libavfilter/af_axcorrelate.c
+++ b/libavfilter/af_axcorrelate.c
@@ -46,23 +46,6 @@ typedef struct AudioXCorrelateContext {
     int (*xcorrelate)(AVFilterContext *ctx, AVFrame *out);
 } AudioXCorrelateContext;
 
-static int query_formats(AVFilterContext *ctx)
-{
-    static const enum AVSampleFormat sample_fmts[] = {
-        AV_SAMPLE_FMT_FLTP,
-        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 float mean_sum(const float *in, int size)
 {
     float mean_sum = 0.f;
@@ -358,5 +341,5 @@ const AVFilter ff_af_axcorrelate = {
     .uninit         = uninit,
     FILTER_INPUTS(inputs),
     FILTER_OUTPUTS(outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP),
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list