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

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


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

diff --git a/libavfilter/af_drmeter.c b/libavfilter/af_drmeter.c
index 010c675271..a4f35b130a 100644
--- a/libavfilter/af_drmeter.c
+++ b/libavfilter/af_drmeter.c
@@ -53,23 +53,6 @@ static const AVOption drmeter_options[] = {
 
 AVFILTER_DEFINE_CLASS(drmeter);
 
-static int query_formats(AVFilterContext *ctx)
-{
-    static const enum AVSampleFormat sample_fmts[] = {
-        AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT,
-        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_output(AVFilterLink *outlink)
 {
     DRMeterContext *s = outlink->src->priv;
@@ -219,5 +202,5 @@ const AVFilter ff_af_drmeter = {
     .uninit        = uninit,
     FILTER_INPUTS(drmeter_inputs),
     FILTER_OUTPUTS(drmeter_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT),
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list