diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-05-28 14:24:07 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-05-29 11:47:06 +0200 |
commit | 364c03d9fe1b7ca1b54644f5477eb75563e11bda (patch) | |
tree | 0c5916bb9f14786a1bdf6927e8f4d2ea3328a682 | |
parent | e71cd1804920b846757adcd45da22b3958f58f83 (diff) | |
download | ffmpeg-364c03d9fe1b7ca1b54644f5477eb75563e11bda.tar.gz |
avfilter/silenceremove_template: improve ptp detector
-rw-r--r-- | libavfilter/silenceremove_template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/silenceremove_template.c b/libavfilter/silenceremove_template.c index c1335adb95..aaaba04f69 100644 --- a/libavfilter/silenceremove_template.c +++ b/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; |