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

Unified · Split

libavfilter/silenceremove_template.c+4−0
@@ -197,6 +197,9 @@ static void fn(filter_start)(AVFilterContext *ctx, · 196 unmodified lines
197 start_nb_samples,197 start_nb_samples,
198 start_window_nb_samples);198 start_window_nb_samples);
199 199
200 if (s->start_found_periods < 0)
201 goto skip;
202
200 if (s->detection != D_PEAK)203 if (s->detection != D_PEAK)
201 window_size = s->start_window_size;204 window_size = s->start_window_size;
202 205
@@ -244,6 +247,7 @@ static void fn(filter_start)(AVFilterContext *ctx, · 41 unmodified lines
244 s->start_sample_count = 0;247 s->start_sample_count = 0;
245 }248 }
246 249
250skip:
247 if (s->start_found_periods < 0) {251 if (s->start_found_periods < 0) {
248 const int dst_pos = out_nb_samples * nb_channels;252 const int dst_pos = out_nb_samples * nb_channels;
249 for (int ch = 0; ch < nb_channels; ch++)253 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