shithub: opus

Download patch

ref: 5277d2db038b1d72d79b4e400566182921630dbf
parent: aaedf1711c118e348f64b529ab5d83881907add2
author: Jean-Marc Valin <[email protected]>
date: Fri Sep 10 13:40:31 EDT 2010

Fixes a divide-by-zero in narrowband mode with small frame size

--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -255,6 +255,8 @@
    
    N0 = M*m->shortMdctSize;
 
+   if (M*(eBands[end]-eBands[end-1]) <= 8)
+      return 0;
    for (c=0;c<C;c++)
    {
       for (i=0;i<end;i++)