projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e5dd2b
)
src/spectral/specdesc.c: return NULL if wrong mode asked
author
Paul Brossier
<piem@piem.org>
Thu, 22 Sep 2016 22:06:45 +0000
(
00:06
+0200)
committer
Paul Brossier
<piem@piem.org>
Thu, 22 Sep 2016 22:06:45 +0000
(
00:06
+0200)
src/spectral/specdesc.c
patch
|
blob
|
history
diff --git
a/src/spectral/specdesc.c
b/src/spectral/specdesc.c
index
138dd48
..
67b95c3
100644
(file)
--- a/
src/spectral/specdesc.c
+++ b/
src/spectral/specdesc.c
@@
-273,8
+273,9
@@
new_aubio_specdesc (const char_t * onset_mode, uint_t size){
else if (strcmp (onset_mode, "default") == 0)
onset_type = aubio_onset_default;
else {
- AUBIO_ERR("unknown spectral descriptor type %s, using default.\n", onset_mode);
- onset_type = aubio_onset_default;
+ AUBIO_ERR("unknown spectral descriptor type %s\n", onset_mode);
+ AUBIO_FREE(o);
+ return NULL;
}
switch(onset_type) {
/* for both energy and hfc, only fftgrain->norm is required */