[FFmpeg-cvslog] avfilter/af_silenceremove: do not trim non-silence from start

Paul B Mahol git at videolan.org
Tue Aug 23 23:15:44 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Aug 23 22:14:09 2022 +0200| [0dff278e5b35eff31ad6057c12820fc087c9c172] | committer: Paul B Mahol

avfilter/af_silenceremove: do not trim non-silence from start

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0dff278e5b35eff31ad6057c12820fc087c9c172
---

 libavfilter/af_silenceremove.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_silenceremove.c b/libavfilter/af_silenceremove.c
index a6db9be9d5..d5a2ac6a41 100644
--- a/libavfilter/af_silenceremove.c
+++ b/libavfilter/af_silenceremove.c
@@ -481,10 +481,12 @@ static int config_input(AVFilterLink *inlink)
     s->stop_holdoff_end    = 0;
     s->stop_found_periods  = 0;
 
-    if (s->start_periods)
+    if (s->start_periods) {
         s->mode = SILENCE_TRIM;
-    else
+        s->one_period = 1;
+    } else {
         s->mode = SILENCE_COPY;
+    }
 
     switch (inlink->format) {
     case AV_SAMPLE_FMT_DBL:



More information about the ffmpeg-cvslog mailing list