aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-09-02 20:21:03 +0200
committerPaul B Mahol <onemda@gmail.com>2021-09-02 20:25:48 +0200
commitba3c09b84aeed514c8fa91a2a457e261e4be4f39 (patch)
tree5d9b07e24b8ac60766e9a2997fe4cc4f084f87f6
parenta311dfc3c47d2928c67234b7afca182e66b3aa93 (diff)
downloadffmpeg-ba3c09b84aeed514c8fa91a2a457e261e4be4f39.tar.gz
avfilter/af_silencedetect: support all channel counts
-rw-r--r--libavfilter/af_silencedetect.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c
index 11fbc94225..6f747b64b2 100644
--- a/libavfilter/af_silencedetect.c
+++ b/libavfilter/af_silencedetect.c
@@ -197,7 +197,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
static int query_formats(AVFilterContext *ctx)
{
- AVFilterChannelLayouts *layouts = NULL;
static const enum AVSampleFormat sample_fmts[] = {
AV_SAMPLE_FMT_DBL,
AV_SAMPLE_FMT_FLT,
@@ -205,12 +204,7 @@ static int query_formats(AVFilterContext *ctx)
AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE
};
- int ret;
-
- layouts = ff_all_channel_layouts();
- if (!layouts)
- return AVERROR(ENOMEM);
- ret = ff_set_common_channel_layouts(ctx, layouts);
+ int ret = ff_set_common_all_channel_counts(ctx);
if (ret < 0)
return ret;