From b95d123097f10a6a3e997cf055c2d4a3bcf78b24 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 28 May 2023 11:14:24 +0200 Subject: [PATCH] avfilter/silenceremove_template: revert wrong change --- libavfilter/silenceremove_template.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/silenceremove_template.c b/libavfilter/silenceremove_template.c index 34d50fcf0e..c1335adb95 100644 --- a/libavfilter/silenceremove_template.c +++ b/libavfilter/silenceremove_template.c @@ -467,8 +467,10 @@ static void fn(filter_stop)(AVFilterContext *ctx, s->stop_found_periods = 0; if (s->stop_found_periods >= 0 || ctx->is_disabled) { - if (s->found_nonsilence) + if (s->found_nonsilence) { s->stop_sample_count += stop_thres; + s->stop_sample_count *= stop_thres; + } } else if (s->stop_silence_count > 0) { const int dst_pos = out_nb_samples * nb_channels; for (int ch = 0; ch < nb_channels; ch++)