mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/af_amultiply: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
ade39d5b4f
commit
d8a5b90a08
|
@ -40,24 +40,6 @@ typedef struct AudioMultiplyContext {
|
||||||
AVFloatDSPContext *fdsp;
|
AVFloatDSPContext *fdsp;
|
||||||
} AudioMultiplyContext;
|
} 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)
|
static int activate(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
AudioMultiplyContext *s = ctx->priv;
|
AudioMultiplyContext *s = ctx->priv;
|
||||||
|
@ -198,5 +180,6 @@ const AVFilter ff_af_amultiply = {
|
||||||
.activate = activate,
|
.activate = activate,
|
||||||
FILTER_INPUTS(inputs),
|
FILTER_INPUTS(inputs),
|
||||||
FILTER_OUTPUTS(outputs),
|
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),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue