summaryrefslogtreecommitdiffstats
path: root/libavfilter/af_silencedetect.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/af_silencedetect.c')
-rw-r--r--libavfilter/af_silencedetect.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c
index 7ae9026..f5fccc5 100644
--- a/libavfilter/af_silencedetect.c
+++ b/libavfilter/af_silencedetect.c
@@ -162,24 +162,31 @@ static int query_formats(AVFilterContext *ctx)
return 0;
}
+static const AVFilterPad silencedetect_inputs[] = {
+ {
+ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .get_audio_buffer = ff_null_get_audio_buffer,
+ .filter_frame = filter_frame,
+ },
+ { NULL }
+};
+
+static const AVFilterPad silencedetect_outputs[] = {
+ {
+ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ },
+ { NULL }
+};
+
AVFilter avfilter_af_silencedetect = {
.name = "silencedetect",
.description = NULL_IF_CONFIG_SMALL("Detect silence."),
.priv_size = sizeof(SilenceDetectContext),
.init = init,
.query_formats = query_formats,
-
- .inputs = (const AVFilterPad[]) {
- { .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .get_audio_buffer = ff_null_get_audio_buffer,
- .filter_frame = filter_frame, },
- { .name = NULL }
- },
- .outputs = (const AVFilterPad[]) {
- { .name = "default",
- .type = AVMEDIA_TYPE_AUDIO, },
- { .name = NULL }
- },
- .priv_class = &silencedetect_class,
+ .inputs = silencedetect_inputs,
+ .outputs = silencedetect_outputs,
+ .priv_class = &silencedetect_class,
};
OpenPOWER on IntegriCloud