@@ -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),
};
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/af_amultiply.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-)