1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/silenceremove_template: improve ptp detector

This commit is contained in:
Paul B Mahol 2023-05-28 14:24:07 +02:00
parent e71cd18049
commit 364c03d9fe

View File

@ -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;