| @@ -54,22 +54,6 @@ static const AVOption silencedetect_options[] = { · 53 unmodified lines |
| 54 | | 54 | |
| 55 | AVFILTER_DEFINE_CLASS(silencedetect); | 55 | AVFILTER_DEFINE_CLASS(silencedetect); |
| 56 | | 56 | |
| 57 | static av_cold int init(AVFilterContext *ctx, const char *args) | | |
| 58 | { | | |
| 59 | int ret; | | |
| 60 | SilenceDetectContext *silence = ctx->priv; | | |
| 61 | | | |
| 62 | silence->class = &silencedetect_class; | | |
| 63 | av_opt_set_defaults(silence); | | |
| 64 | | | |
| 65 | if ((ret = av_set_options_string(silence, args, "=", ":")) < 0) | | |
| 66 | return ret; | | |
| 67 | | | |
| 68 | av_opt_free(silence); | | |
| 69 | | | |
| 70 | return 0; | | |
| 71 | } | | |
| 72 | | | |
| 73 | static char *get_metadata_val(AVFrame *insamples, const char *key) | 57 | static char *get_metadata_val(AVFrame *insamples, const char *key) |
| 74 | { | 58 | { |
| 75 | AVDictionaryEntry *e = av_dict_get(insamples->metadata, key, NULL, 0); | 59 | AVDictionaryEntry *e = av_dict_get(insamples->metadata, key, NULL, 0); |
| @@ -176,7 +160,6 @@ AVFilter avfilter_af_silencedetect = { · 100 unmodified lines |
| 176 | .name = "silencedetect", | 160 | .name = "silencedetect", |
| 177 | .description = NULL_IF_CONFIG_SMALL("Detect silence."), | 161 | .description = NULL_IF_CONFIG_SMALL("Detect silence."), |
| 178 | .priv_size = sizeof(SilenceDetectContext), | 162 | .priv_size = sizeof(SilenceDetectContext), |
| 179 | .init = init, | | |
| 180 | .query_formats = query_formats, | 163 | .query_formats = query_formats, |
| 181 | .inputs = silencedetect_inputs, | 164 | .inputs = silencedetect_inputs, |
| 182 | .outputs = silencedetect_outputs, | 165 | .outputs = silencedetect_outputs, |