Addressing all the FIXMEs in the code
Includes better error handling in fft/mdct init
diff --git a/libcelt/modes.c b/libcelt/modes.c
index 968bc2f..0ba8d16 100644
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -381,19 +381,15 @@
compute_pulse_cache(mode, mode->maxLM);
- clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize*mode->nbShortMdcts, mode->maxLM);
- if ((mode->mdct.trig==NULL)
-#ifndef ENABLE_TI_DSPLIB55
- || (mode->mdct.kfft==NULL)
-#endif
- )
+ if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize*mode->nbShortMdcts,
+ mode->maxLM) == 0)
goto failure;
if (error)
*error = CELT_OK;
return mode;
-failure:
+failure:
if (error)
*error = CELT_ALLOC_FAIL;
if (mode!=NULL)