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:04 +0200 |
commit | 54fd49f3520ba26283194d36ffbb8a1553871f89 (patch) | |
tree | 814923121ee2982ffa6ebe1075585b9b4fd253bf | |
parent | 6b72e0be4f7daf633936f87c372c1392c4a21e65 (diff) | |
download | ffmpeg-54fd49f3520ba26283194d36ffbb8a1553871f89.tar.gz |
avfilter/af_volumedetect: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavfilter/af_volumedetect.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index ba49b3ca37..c137cc7e50 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -33,20 +33,6 @@ typedef struct VolDetectContext { uint64_t histogram[0x10001]; } VolDetectContext; -static int query_formats(AVFilterContext *ctx) -{ - static const enum AVSampleFormat sample_fmts[] = { - AV_SAMPLE_FMT_S16, - AV_SAMPLE_FMT_S16P, - AV_SAMPLE_FMT_NONE - }; - int ret = ff_set_common_all_channel_counts(ctx); - if (ret < 0) - return ret; - - return ff_set_common_formats_from_list(ctx, sample_fmts); -} - static int filter_frame(AVFilterLink *inlink, AVFrame *samples) { AVFilterContext *ctx = inlink->dst; @@ -150,5 +136,5 @@ const AVFilter ff_af_volumedetect = { .uninit = uninit, FILTER_INPUTS(volumedetect_inputs), FILTER_OUTPUTS(volumedetect_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P), }; |