History

avfilter/silenceremove_template: improve ptp detector

Paul B Mahol committed 3 years ago

Commit 364c03d1 parent e71cd181 file · +2 −2Browse files

Unified · Split

libavfilter/silenceremove_template.c+2−2
@@ -286,8 +286,8 @@ static ftype fn(compute_ptp)(ftype *peak, ftype sample, ftype wsample, · 285 unmodified lines
286286
287287 peak[back] = sample;
288288 max = peak[front];
289− min = (back == front) ? -sample : sample;
290− r = FABS(max - min);
289+ min = sample;
290+ r = FABS(min) + FABS(max - min);
291291
292292 *ffront = front;
293293 *bback = back;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t