diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-27 12:28:23 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-05 18:01:02 +0200 |
commit | 920c2fc9b116369acadccf2961ec1c56b602d5a9 (patch) | |
tree | 36104cddddddf96d12a4bbda4f31f3e3717311c3 /libavfilter/af_aecho.c | |
parent | 5f39512dee97d2e2c83aca6f41b1f395dcc45808 (diff) | |
download | ffmpeg-920c2fc9b116369acadccf2961ec1c56b602d5a9.tar.gz |
avfilter/af_aecho: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/af_aecho.c')
-rw-r--r-- | libavfilter/af_aecho.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/libavfilter/af_aecho.c b/libavfilter/af_aecho.c index 508d54b04e..73d9f1ac7f 100644 --- a/libavfilter/af_aecho.c +++ b/libavfilter/af_aecho.c @@ -152,24 +152,6 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -static int query_formats(AVFilterContext *ctx) -{ - static const enum AVSampleFormat sample_fmts[] = { - AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P, - AV_SAMPLE_FMT_FLTP, 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); -} - #define MOD(a, b) (((a) >= (b)) ? (a) - (b) : (a)) #define ECHO(name, type, min, max) \ @@ -371,5 +353,6 @@ const AVFilter ff_af_aecho = { .uninit = uninit, FILTER_INPUTS(aecho_inputs), FILTER_OUTPUTS(aecho_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P, + AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), }; |