ref: c37834b27e43cdd3146ffa8d2a67a09d5ce79abe
parent: 2fb4f5c43940d2b29b73d847ce8f8cf1b992896a
author: Jean-Marc Valin <[email protected]>
date: Sun Apr 14 22:45:02 EDT 2013
Fixes a minor bug found by valgrind in the bandwidth detector The energy calculation from the packed FFTs ended up reading out-of-bound memory for frequency zero. The bug was exposed by c5e04e4.
--- a/src/analysis.c
+++ b/src/analysis.c
@@ -101,7 +101,7 @@
};
static const int extra_bands[NB_TOT_BANDS+1] = {
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120, 160, 200
+ 1, 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120, 160, 200
};
/*static const float tweight[NB_TBANDS+1] = {