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:03 +0200 |
commit | 9abb877362c179ef02b7e11baeefbb1ee5e5b465 (patch) | |
tree | e6e887950336748fdcc21371795459158137f3cf /libavfilter | |
parent | 861aaebf7c941eef747c22fa21cd67911e2789e7 (diff) |
avfilter/af_silenceremove: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_silenceremove.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/libavfilter/af_silenceremove.c b/libavfilter/af_silenceremove.c index 1b420d7838..a02e1de783 100644 --- a/libavfilter/af_silenceremove.c +++ b/libavfilter/af_silenceremove.c @@ -923,24 +923,6 @@ static int request_frame(AVFilterLink *outlink) return ret; } -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 av_cold void uninit(AVFilterContext *ctx) { SilenceRemoveContext *s = ctx->priv; @@ -981,5 +963,6 @@ const AVFilter ff_af_silenceremove = { .uninit = uninit, FILTER_INPUTS(silenceremove_inputs), FILTER_OUTPUTS(silenceremove_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, + AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP), }; |