shithub: opus

Download patch

ref: b0bef8564ef099eea4a6d98eb9c424e3ee0a11a9
parent: f3190f26b90dc4761ac16af138659afd2b12f278
author: Jean-Marc Valin <[email protected]>
date: Thu Oct 2 19:52:46 EDT 2008

compute_alloc_cache() isn't defined when STATIC_MODES is.

--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -392,6 +392,8 @@
    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 @@
    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;