shithub: aacenc

Download patch

ref: 562ee6e14b265790070b040d2d436011cd1c590e
parent: 349fda6ecd3400b2a693bb1506cdc9a2642a36d1
author: menno <menno>
date: Thu Jan 6 05:16:11 EST 2000

Divide by zero bugfix

--- a/nok_pitch.c
+++ b/nok_pitch.c
@@ -34,8 +34,8 @@
 /**************************************************************************
   Version Control Information			Method: CVS
   Identifiers:
-  $Revision: 1.1 $
-  $Date: 2000/01/05 21:41:37 $ (check in)
+  $Revision: 1.2 $
+  $Date: 2000/01/06 10:16:11 $ (check in)
   $Author: menno $
   *************************************************************************/
 
@@ -371,7 +371,8 @@
 	for (i = 0; i < LPC; i++)
 		weight[i] = 0.0;
 
-	weight[(LPC - 1) / 2] = r[(LPC - 1) / 2][LPC] / r[(LPC - 1) / 2][(LPC - 1) / 2];
+	if (r[(LPC - 1) / 2][(LPC - 1) / 2] != 0.0)
+		weight[(LPC - 1) / 2] = r[(LPC - 1) / 2][LPC] / r[(LPC - 1) / 2][(LPC - 1) / 2];
 
 	lnqgj (r);