diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-05-26 09:54:40 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-05-26 10:13:37 +0200 |
commit | 29710dd7f2d771ca83ae3b7701b4354b5233e4f3 (patch) | |
tree | 89eb62b6ce0c4f4a02d47f5ee3d75bb65332170a /libavfilter | |
parent | f59d9514dae7cbdd465fbd22a64e05d679ba6ce3 (diff) | |
download | ffmpeg-29710dd7f2d771ca83ae3b7701b4354b5233e4f3.tar.gz |
avfilter/af_silenceremove: speed-up start-only trimming once trim is over
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_silenceremove.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/af_silenceremove.c b/libavfilter/af_silenceremove.c index 28c972f86f..a3ad0eea13 100644 --- a/libavfilter/af_silenceremove.c +++ b/libavfilter/af_silenceremove.c @@ -372,6 +372,12 @@ static int activate(AVFilterContext *ctx) if (ret < 0) return ret; if (ret > 0) { + if (s->start_periods == 1 && s->stop_periods == 0 && + s->start_found_periods < 0) { + in->pts = s->next_pts; + s->next_pts += in->nb_samples; + return ff_filter_frame(outlink, in); + } if (s->start_periods == 0 && s->stop_periods == 0) return ff_filter_frame(outlink, in); return filter_frame(outlink, in); |