mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
avfilter/af_dynaudnorm: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
a4e9a7e40a
commit
e74acd5771
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user