1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/af_tremolo: Store format in filter, remove query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 13:10:11 +02:00
parent 53aa11a6f1
commit c5610d5a06

View File

@ -83,23 +83,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return ff_filter_frame(outlink, out);
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVSampleFormat sample_fmts[] = {
AV_SAMPLE_FMT_DBL,
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 av_cold void uninit(AVFilterContext *ctx)
{
TremoloContext *s = ctx->priv;
@ -153,5 +136,5 @@ const AVFilter ff_af_tremolo = {
.uninit = uninit,
FILTER_INPUTS(avfilter_af_tremolo_inputs),
FILTER_OUTPUTS(avfilter_af_tremolo_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL),
};