aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 13:10:11 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:01:03 +0200
commita4e9a7e40aec4b2e5659b4f85c868a73beee5e85 (patch)
treeb7da67e2bddc65e3feedd1e487012f13945438bc
parenta731d0907fab511f9e5cfa525198c47d182d1d6b (diff)
downloadffmpeg-a4e9a7e40aec4b2e5659b4f85c868a73beee5e85.tar.gz
avfilter/af_drmeter: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavfilter/af_drmeter.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/libavfilter/af_drmeter.c b/libavfilter/af_drmeter.c
index 010c675271..a4f35b130a 100644
--- a/libavfilter/af_drmeter.c
+++ b/libavfilter/af_drmeter.c
@@ -53,23 +53,6 @@ static const AVOption drmeter_options[] = {
AVFILTER_DEFINE_CLASS(drmeter);
-static int query_formats(AVFilterContext *ctx)
-{
- static const enum AVSampleFormat sample_fmts[] = {
- AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT,
- 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 int config_output(AVFilterLink *outlink)
{
DRMeterContext *s = outlink->src->priv;
@@ -219,5 +202,5 @@ const AVFilter ff_af_drmeter = {
.uninit = uninit,
FILTER_INPUTS(drmeter_inputs),
FILTER_OUTPUTS(drmeter_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT),
};