mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/silenceremove_template: skip silence start detection after start-only trimming is over
This commit is contained in:
parent
2b5166addf
commit
f59d9514da
|
@ -197,6 +197,9 @@ static void fn(filter_start)(AVFilterContext *ctx,
|
||||||
start_nb_samples,
|
start_nb_samples,
|
||||||
start_window_nb_samples);
|
start_window_nb_samples);
|
||||||
|
|
||||||
|
if (s->start_found_periods < 0)
|
||||||
|
goto skip;
|
||||||
|
|
||||||
if (s->detection != D_PEAK)
|
if (s->detection != D_PEAK)
|
||||||
window_size = s->start_window_size;
|
window_size = s->start_window_size;
|
||||||
|
|
||||||
|
@ -244,6 +247,7 @@ static void fn(filter_start)(AVFilterContext *ctx,
|
||||||
s->start_sample_count = 0;
|
s->start_sample_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skip:
|
||||||
if (s->start_found_periods < 0) {
|
if (s->start_found_periods < 0) {
|
||||||
const int dst_pos = out_nb_samples * nb_channels;
|
const int dst_pos = out_nb_samples * nb_channels;
|
||||||
for (int ch = 0; ch < nb_channels; ch++)
|
for (int ch = 0; ch < nb_channels; ch++)
|
||||||
|
|
Loading…
Reference in New Issue