projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e391790
)
src/tempo/beattracking.c: avoid segfault on silence (closes #24)
author
Paul Brossier
<piem@piem.org>
Sat, 1 Aug 2015 08:54:37 +0000
(10:54 +0200)
committer
Paul Brossier
<piem@piem.org>
Sat, 1 Aug 2015 08:54:37 +0000
(10:54 +0200)
src/tempo/beattracking.c
patch
|
blob
|
history
diff --git
a/src/tempo/beattracking.c
b/src/tempo/beattracking.c
index
548aebc
..
3bfa1de
100644
(file)
--- a/
src/tempo/beattracking.c
+++ b/
src/tempo/beattracking.c
@@
-266,6
+266,7
@@
fvec_gettimesig (fvec_t * acf, uint_t acflen, uint_t gp)
{
sint_t k = 0;
smpl_t three_energy = 0., four_energy = 0.;
+ if (gp < 2) return 4;
if (acflen > 6 * gp + 2) {
for (k = -2; k < 2; k++) {
three_energy += acf->data[3 * gp + k];