summaryrefslogtreecommitdiff
path: root/libavfilter/af_silencedetect.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/af_silencedetect.c')
-rw-r--r--libavfilter/af_silencedetect.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c
index bfda3e574d..d6bcd6347d 100644
--- a/libavfilter/af_silencedetect.c
+++ b/libavfilter/af_silencedetect.c
@@ -42,11 +42,12 @@ typedef struct {
} SilenceDetectContext;
#define OFFSET(x) offsetof(SilenceDetectContext, x)
+#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM
static const AVOption silencedetect_options[] = {
- { "n", "set noise tolerance", OFFSET(noise_str), AV_OPT_TYPE_STRING, {.str="-60dB"}, CHAR_MIN, CHAR_MAX },
- { "noise", "set noise tolerance", OFFSET(noise_str), AV_OPT_TYPE_STRING, {.str="-60dB"}, CHAR_MIN, CHAR_MAX },
- { "d", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_INT, {.dbl=2}, 0, INT_MAX},
- { "duration", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_INT, {.dbl=2}, 0, INT_MAX},
+ { "n", "set noise tolerance", OFFSET(noise_str), AV_OPT_TYPE_STRING, {.str="-60dB"}, CHAR_MIN, CHAR_MAX, FLAGS },
+ { "noise", "set noise tolerance", OFFSET(noise_str), AV_OPT_TYPE_STRING, {.str="-60dB"}, CHAR_MIN, CHAR_MAX, FLAGS },
+ { "d", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_INT, {.dbl=2}, 0, INT_MAX, FLAGS },
+ { "duration", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_INT, {.dbl=2}, 0, INT_MAX, FLAGS },
{ NULL },
};
@@ -165,4 +166,5 @@ AVFilter avfilter_af_silencedetect = {
.type = AVMEDIA_TYPE_AUDIO, },
{ .name = NULL }
},
+ .priv_class = &silencedetect_class,
};