aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-05-28 14:24:07 +0200
committerPaul B Mahol <onemda@gmail.com>2023-05-29 11:47:06 +0200
commit364c03d9fe1b7ca1b54644f5477eb75563e11bda (patch)
tree0c5916bb9f14786a1bdf6927e8f4d2ea3328a682 /libavfilter
parente71cd1804920b846757adcd45da22b3958f58f83 (diff)
downloadffmpeg-364c03d9fe1b7ca1b54644f5477eb75563e11bda.tar.gz
avfilter/silenceremove_template: improve ptp detector
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/silenceremove_template.c4
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;