History

lavc/lpc: do not explode when windowing a 1-length array

Divided by 0.

Lynne committed 4 years ago

Commit cc367a91 parent e601ec31 file · +5 −0Browse files

Unified · Split

libavcodec/lpc.c+5−0
@@ -38,6 +38,11 @@ static void lpc_apply_welch_window_c(const int32_t *data, int len, · 37 unmodified lines
3838 double w;
3939 double c;
4040
41+ if (len == 1) {
42+ w_data[0] = 0.0;
43+ return;
44+ }
45+
4146 n2 = (len >> 1);
4247 c = 2.0 / (len - 1.0);
4348

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