shithub: opus

Download patch

ref: b8002a0ef30d10be1f8e851e72115b376744a3f5
parent: e14fe9046fde445108736c6ddbcf4e9c85eaedbd
author: Thorvald Natvig <[email protected]>
date: Fri Dec 11 08:19:09 EST 2009

Varlength arrays fix for C89

--- a/libcelt/plc.c
+++ b/libcelt/plc.c
@@ -106,7 +106,9 @@
 {
    float d;
    int i;
-   float xx[n];
+   VARDECL(float, xx);
+   SAVE_STACK;
+   ALLOC(xx, n, float);
    for (i=0;i<n;i++)
       xx[i] = x[i];
    for (i=0;i<overlap;i++)
@@ -122,4 +124,5 @@
       lag--;
    }
    ac[0] += 10;
+   RESTORE_STACK;
 }