From d8a5b90a082f0f12f30db48e93f579191806099c Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 27 Sep 2021 13:10:11 +0200 Subject: [PATCH] avfilter/af_amultiply: Use formats list instead of query function Signed-off-by: Andreas Rheinhardt --- libavfilter/af_amultiply.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/libavfilter/af_amultiply.c b/libavfilter/af_amultiply.c index f9413c9fc9..5de711bade 100644 --- a/libavfilter/af_amultiply.c +++ b/libavfilter/af_amultiply.c @@ -40,24 +40,6 @@ typedef struct AudioMultiplyContext { AVFloatDSPContext *fdsp; } AudioMultiplyContext; -static int query_formats(AVFilterContext *ctx) -{ - static const enum AVSampleFormat sample_fmts[] = { - AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, - AV_SAMPLE_FMT_DBL, 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 activate(AVFilterContext *ctx) { AudioMultiplyContext *s = ctx->priv; @@ -198,5 +180,6 @@ const AVFilter ff_af_amultiply = { .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, + AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP), };