Fixing the global stack -- and an overflow in collapse_mask

This commit is contained in:
Jean-Marc Valin 2011-02-01 18:00:29 -05:00
parent 2799c29792
commit 7e983194a3
2 changed files with 8 additions and 2 deletions

View file

@ -286,11 +286,13 @@ CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error)
scanf("%d ", band_allocation+i);
}
#endif
#ifdef CUSTOM_MODES
ALLOC_STACK;
#if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA)
if (global_stack==NULL)
goto failure;
#endif
#endif
#ifndef CUSTOM_MODES_ONLY
for (i=0;i<TOTAL_MODES;i++)