diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-27 14:24:56 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-05 18:01:04 +0200 |
commit | 0e42f12ec60ec4604bc13e8bdbef7fc49119d35f (patch) | |
tree | 32f4ffc695bea1b8ddb916ad0bf3cba2f2de2190 /libavfilter/af_agate.c | |
parent | 5c36cb2ebf7f46b34e3074e493fdd4fd19358707 (diff) | |
download | ffmpeg-0e42f12ec60ec4604bc13e8bdbef7fc49119d35f.tar.gz |
avfilter/af_agate: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/af_agate.c')
-rw-r--r-- | libavfilter/af_agate.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c index ff61bad250..682f17c7dd 100644 --- a/libavfilter/af_agate.c +++ b/libavfilter/af_agate.c @@ -188,24 +188,6 @@ static void gate(AudioGateContext *s, #if CONFIG_AGATE_FILTER -static int query_formats(AVFilterContext *ctx) -{ - AVFilterFormats *formats = NULL; - int ret; - - if ((ret = ff_add_format(&formats, AV_SAMPLE_FMT_DBL)) < 0) - return ret; - ret = ff_set_common_formats(ctx, formats); - if (ret < 0) - return ret; - - ret = ff_set_common_all_channel_counts(ctx); - if (ret < 0) - return ret; - - return ff_set_common_all_samplerates(ctx); -} - static int filter_frame(AVFilterLink *inlink, AVFrame *in) { const double *src = (const double *)in->data[0]; @@ -258,7 +240,7 @@ const AVFilter ff_af_agate = { .priv_size = sizeof(AudioGateContext), FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), .process_command = ff_filter_process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; |