some bugfixes
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Thu, 22 Dec 2005 11:16:04 +0000 (11:16 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Thu, 22 Dec 2005 11:16:04 +0000 (11:16 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@10674 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/kiss_fft.c
libspeex/kiss_fft.h

index 412cdb5..2a07469 100644 (file)
@@ -371,7 +371,7 @@ kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem
     if ( lenmem==NULL ) {
         st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded );
     }else{
-        if (*lenmem >= memneeded)
+        if (mem != NULL && *lenmem >= memneeded)
             st = (kiss_fft_cfg)mem;
         *lenmem = memneeded;
     }
index f67963f..4d73f31 100644 (file)
@@ -35,11 +35,7 @@ extern "C" {
 
 #ifdef FIXED_POINT
 #include <sys/types.h> 
-# if (FIXED_POINT == 32)
-#  define kiss_fft_scalar int32_t
-# else 
 #  define kiss_fft_scalar int16_t
-# endif
 #else
 # ifndef kiss_fft_scalar
 /*  default is float */