Showing the changes to libavfilter (2 of 3 files). Show all
Unified · Split
| @@ -54,22 +54,6 @@ static const AVOption silencedetect_options[] = { · 53 unmodified lines | ||
| 54 | 54 | |
| 55 | 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 | 57 | static char *get_metadata_val(AVFrame *insamples, const char *key) |
| 74 | 58 | { |
| 75 | 59 | AVDictionaryEntry *e = av_dict_get(insamples->metadata, key, NULL, 0); |
| @@ -176,7 +160,6 @@ AVFilter avfilter_af_silencedetect = { · 100 unmodified lines | ||
| 176 | 160 | .name = "silencedetect", |
| 177 | 161 | .description = NULL_IF_CONFIG_SMALL("Detect silence."), |
| 178 | 162 | .priv_size = sizeof(SilenceDetectContext), |
| 179 | − .init = init, | |
| 180 | 163 | .query_formats = query_formats, |
| 181 | 164 | .inputs = silencedetect_inputs, |
| 182 | 165 | .outputs = silencedetect_outputs, |
| @@ -681,6 +681,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 680 unmodified lines | ||
| 681 | 681 | !strcmp(filter->filter->name, "format") || |
| 682 | 682 | !strcmp(filter->filter->name, "noformat") || |
| 683 | 683 | !strcmp(filter->filter->name, "resample") || |
| 684 | + !strcmp(filter->filter->name, "silencedetect") || | |
| 684 | 685 | !strcmp(filter->filter->name, "thumbnail") || |
| 685 | 686 | // !strcmp(filter->filter->name, "scale" ) || |
| 686 | 687 | 0 |