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

Divided by 0.
pull/388/head
Lynne 2 years ago
parent e601ec3c19
commit cc367a9b8a
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 5
      libavcodec/lpc.c

@ -38,6 +38,11 @@ static void lpc_apply_welch_window_c(const int32_t *data, int len,
double w;
double c;
if (len == 1) {
w_data[0] = 0.0;
return;
}
n2 = (len >> 1);
c = 2.0 / (len - 1.0);

Loading…
Cancel
Save