You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavc/lpc: do not explode when windowing a 1-length array
Divided by 0.
This commit is contained in:
@@ -38,6 +38,11 @@ static void lpc_apply_welch_window_c(const int32_t *data, int len,
|
|||||||
double w;
|
double w;
|
||||||
double c;
|
double c;
|
||||||
|
|
||||||
|
if (len == 1) {
|
||||||
|
w_data[0] = 0.0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
n2 = (len >> 1);
|
n2 = (len >> 1);
|
||||||
c = 2.0 / (len - 1.0);
|
c = 2.0 / (len - 1.0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user