summaryrefslogtreecommitdiff
path: root/libavfilter/af_aphaser.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 13:10:11 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:01:02 +0200
commit8a588deb929132749c7f6878530619a9bbc130be (patch)
tree7a15cb960066c1a3ddeedb85ba8a858eca089bd2 /libavfilter/af_aphaser.c
parent06ff6dad44ed3bda3270f8d72d035bd840103ca5 (diff)
avfilter/af_aphaser: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/af_aphaser.c')
-rw-r--r--libavfilter/af_aphaser.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/libavfilter/af_aphaser.c b/libavfilter/af_aphaser.c
index 962bfe6b16..2d95802677 100644
--- a/libavfilter/af_aphaser.c
+++ b/libavfilter/af_aphaser.c
@@ -83,26 +83,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_DBL, AV_SAMPLE_FMT_DBLP,
- AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
- AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32P,
- AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P,
- 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 PHASER_PLANAR(name, type) \
@@ -283,6 +263,9 @@ const AVFilter ff_af_aphaser = {
.uninit = uninit,
FILTER_INPUTS(aphaser_inputs),
FILTER_OUTPUTS(aphaser_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP,
+ AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
+ AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32P,
+ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P),
.priv_class = &aphaser_class,
};