fixed three declaration-after-statement issues

This commit is contained in:
Jean-Marc Valin 2008-04-11 17:23:01 +10:00
parent 766257109e
commit 9656ca0090
3 changed files with 3 additions and 3 deletions

View file

@ -217,13 +217,13 @@ int main(int argc, char **argv)
{ {
int i, nb; int i, nb;
FILE *file; FILE *file;
CELTMode **m;
if (argc%4 != 1) if (argc%4 != 1)
{ {
fprintf (stderr, "must have a multiple of 4 arguments\n"); fprintf (stderr, "must have a multiple of 4 arguments\n");
return 1; return 1;
} }
nb = (argc-1)/4; nb = (argc-1)/4;
CELTMode **m;
m = malloc(nb*sizeof(CELTMode*)); m = malloc(nb*sizeof(CELTMode*));
for (i=0;i<nb;i++) for (i=0;i<nb;i++)
{ {

View file

@ -321,7 +321,6 @@ CELTMode EXPORT *celt_mode_create(celt_int32_t Fs, int channels, int frame_size,
void EXPORT celt_mode_destroy(CELTMode *mode) void EXPORT celt_mode_destroy(CELTMode *mode)
{ {
mdct_clear(&mode->mdct);
#ifndef STATIC_MODES #ifndef STATIC_MODES
int i; int i;
const celt_int16_t *prevPtr = NULL; const celt_int16_t *prevPtr = NULL;
@ -346,6 +345,7 @@ void EXPORT celt_mode_destroy(CELTMode *mode)
mode->marker_end = MODEFREED; mode->marker_end = MODEFREED;
psydecay_clear(&mode->psy); psydecay_clear(&mode->psy);
#endif #endif
mdct_clear(&mode->mdct);
celt_free((CELTMode *)mode); celt_free((CELTMode *)mode);
} }

View file

@ -112,10 +112,10 @@ void compute_alloc_cache(CELTMode *m)
{ {
bits[i] = bits[i-1]; bits[i] = bits[i-1];
} else { } else {
int j;
VARDECL(celt_uint64_t, u); VARDECL(celt_uint64_t, u);
SAVE_STACK; SAVE_STACK;
ALLOC(u, N, celt_uint64_t); ALLOC(u, N, celt_uint64_t);
int j;
/* FIXME: We could save memory here */ /* FIXME: We could save memory here */
bits[i] = celt_alloc(MAX_PULSES*sizeof(celt_int16_t)); bits[i] = celt_alloc(MAX_PULSES*sizeof(celt_int16_t));
for (j=0;j<MAX_PULSES;j++) for (j=0;j<MAX_PULSES;j++)