diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-04-22 15:31:34 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-04-22 18:12:47 +0200 |
commit | 014c02d43bbf35113d5794e4708cb84179d0c9d3 (patch) | |
tree | ae377b4c8f885820b2e56f756f1c8a0df5e3c964 | |
parent | 41bbf2e372f39d99e9fafd2a90a44c4d517d85c0 (diff) | |
download | ffmpeg-014c02d43bbf35113d5794e4708cb84179d0c9d3.tar.gz |
avfilter/af_anlms: simplify query formats
-rw-r--r-- | libavfilter/af_anlms.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c index 6658cd2940..a2c854b0b8 100644 --- a/libavfilter/af_anlms.c +++ b/libavfilter/af_anlms.c @@ -78,23 +78,6 @@ static const AVOption anlms_options[] = { AVFILTER_DEFINE_CLASS_EXT(anlms, "anlm(f|s)", anlms_options); -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 fir_sample(AudioNLMSContext *s, float sample, float *delay, float *coeffs, float *tmp, int *offset) { @@ -316,7 +299,7 @@ const AVFilter ff_af_anlms = { .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, @@ -332,7 +315,7 @@ const AVFilter ff_af_anlmf = { .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, |