shithub: opus

Download patch

ref: cb8780ca9616a831250bf5d10a11514d377a9bea
parent: 8ccf148573277b983692e15d5f0753081f806bea
author: Jean-Marc Valin <[email protected]>
date: Mon Jul 20 19:40:35 EDT 2009

C89 compatibility fixes for pseudo-stack mode.

Conflicts:

	libcelt/celt.c

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -913,6 +913,7 @@
 {
    int j, ret, C, N;
    VARDECL(celt_int16_t, in);
+   SAVE_STACK;
 
    if (check_encoder(st) != CELT_OK)
       return CELT_INVALID_STATE;
@@ -923,7 +924,6 @@
    if (pcm==NULL)
       return CELT_BAD_ARG;
 
-   SAVE_STACK;
    C = CHANNELS(st->mode);
    N = st->block_size;
    ALLOC(in, C*N, celt_int16_t);
@@ -948,6 +948,7 @@
 {
    int j, ret, C, N;
    VARDECL(celt_sig_t, in);
+   SAVE_STACK;
 
    if (check_encoder(st) != CELT_OK)
       return CELT_INVALID_STATE;
@@ -958,7 +959,6 @@
    if (pcm==NULL)
       return CELT_BAD_ARG;
 
-   SAVE_STACK;
    C=CHANNELS(st->mode);
    N=st->block_size;
    ALLOC(in, C*N, celt_sig_t);
@@ -1441,6 +1441,7 @@
 {
    int j, ret, C, N;
    VARDECL(celt_int16_t, out);
+   SAVE_STACK;
 
    if (check_decoder(st) != CELT_OK)
       return CELT_INVALID_STATE;
@@ -1451,7 +1452,6 @@
    if (pcm==NULL)
       return CELT_BAD_ARG;
 
-   SAVE_STACK;
    C = CHANNELS(st->mode);
    N = st->block_size;
    
@@ -1469,6 +1469,7 @@
 {
    int j, ret, C, N;
    VARDECL(celt_sig_t, out);
+   SAVE_STACK;
 
    if (check_decoder(st) != CELT_OK)
       return CELT_INVALID_STATE;
@@ -1479,7 +1480,6 @@
    if (pcm==NULL)
       return CELT_BAD_ARG;
 
-   SAVE_STACK;
    C = CHANNELS(st->mode);
    N = st->block_size;
    ALLOC(out, C*N, celt_sig_t);