History

avfilter/silenceremove_template: skip silence start detection after start-only trimming is over

Paul B Mahol committed 3 years ago

Commit f59d9511 parent 2b5166a1 file · +4 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/silenceremove_template.c+4−0
@@ -197,6 +197,9 @@ static void fn(filter_start)(AVFilterContext *ctx, · 196 unmodified lines
197197 start_nb_samples,
198198 start_window_nb_samples);
199199
200+ if (s->start_found_periods < 0)
201+ goto skip;
202+
200203 if (s->detection != D_PEAK)
201204 window_size = s->start_window_size;
202205
@@ -244,6 +247,7 @@ static void fn(filter_start)(AVFilterContext *ctx, · 41 unmodified lines
244247 s->start_sample_count = 0;
245248 }
246249
250+skip:
247251 if (s->start_found_periods < 0) {
248252 const int dst_pos = out_nb_samples * nb_channels;
249253 for (int ch = 0; ch < nb_channels; ch++)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t