diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-27 13:10:11 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-05 18:01:03 +0200 |
commit | 6b72e0be4f7daf633936f87c372c1392c4a21e65 (patch) | |
tree | 33cf9e3a301de7814374c5077214f914471ba0e9 | |
parent | c5610d5a0623524187793b82deb8081ff24e262f (diff) | |
download | ffmpeg-6b72e0be4f7daf633936f87c372c1392c4a21e65.tar.gz |
avfilter/af_vibrato: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavfilter/af_vibrato.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/libavfilter/af_vibrato.c b/libavfilter/af_vibrato.c index 46b6b766bf..c0cbcbf6f2 100644 --- a/libavfilter/af_vibrato.c +++ b/libavfilter/af_vibrato.c @@ -111,23 +111,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_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 av_cold void uninit(AVFilterContext *ctx) { VibratoContext *s = ctx->priv; @@ -191,5 +174,5 @@ const AVFilter ff_af_vibrato = { .uninit = uninit, FILTER_INPUTS(avfilter_af_vibrato_inputs), FILTER_OUTPUTS(avfilter_af_vibrato_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), }; |