avfilter/silenceremove_template: improve ptp detector

pull/389/head
Paul B Mahol 1 year ago
parent e71cd18049
commit 364c03d9fe
  1. 4
      libavfilter/silenceremove_template.c

@ -286,8 +286,8 @@ static ftype fn(compute_ptp)(ftype *peak, ftype sample, ftype wsample,
peak[back] = sample;
max = peak[front];
min = (back == front) ? -sample : sample;
r = FABS(max - min);
min = sample;
r = FABS(min) + FABS(max - min);
*ffront = front;
*bback = back;

Loading…
Cancel
Save