avfilter/af_dynaudnorm: 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 a4e9a7e40a
commit e74acd5771
1 changed files with 1 additions and 18 deletions

View File

@ -127,23 +127,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_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 inline int frame_size(int sample_rate, int frame_len_msec)
{
const int frame_size = lrint((double)sample_rate * (frame_len_msec / 1000.0));
@ -880,7 +863,7 @@ const AVFilter ff_af_dynaudnorm = {
.activate = activate,
FILTER_INPUTS(avfilter_af_dynaudnorm_inputs),
FILTER_OUTPUTS(avfilter_af_dynaudnorm_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP),
.priv_class = &dynaudnorm_class,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
.process_command = process_command,