From b0bef8564ef099eea4a6d98eb9c424e3ee0a11a9 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Thu, 2 Oct 2008 23:52:46 -0400 Subject: [PATCH] compute_alloc_cache() isn't defined when STATIC_MODES is. --- libcelt/modes.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libcelt/modes.c b/libcelt/modes.c index 0d52f3c6..c95427f7 100644 --- a/libcelt/modes.c +++ b/libcelt/modes.c @@ -392,6 +392,8 @@ CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int *e mode->window = window; mode->bits = (const celt_int16_t **)compute_alloc_cache(mode, 1); + if (mode->nbChannels>=2) + mode->bits_stereo = (const celt_int16_t **)compute_alloc_cache(mode, mode->nbChannels); mode->bits_stereo = NULL; #ifndef SHORTCUTS @@ -409,9 +411,6 @@ CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int *e mode->shortWindow = mode->window; mode->prob = quant_prob_alloc(mode); - - if (mode->nbChannels>=2) - mode->bits_stereo = (const celt_int16_t **)compute_alloc_cache(mode, mode->nbChannels); if (error) *error = CELT_OK;