diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-27 13:10:11 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-05 18:01:02 +0200 |
commit | d8a5b90a082f0f12f30db48e93f579191806099c (patch) | |
tree | 98e54bb09245b6200ab45eade40a1888e5cc0eac | |
parent | ade39d5b4ff722d27cf27a9f845fb9fb0bc8d868 (diff) |
avfilter/af_amultiply: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavfilter/af_amultiply.c | 21 |
1 files 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), }; |