shithub: aacenc

Download patch

ref: b598e13a019104640bd60e12b731e4b6056cdbeb
parent: 8c4d94783f7305dee81ea772c6fb463a164ea4fb
author: menno <menno>
date: Mon Jan 10 14:49:55 EST 2000

Small fix

--- a/enc_tf.c
+++ b/enc_tf.c
@@ -545,7 +545,7 @@
 							block_type[leftChan], 
 							WS_FHG,
 							block_size_samples,
-							0,
+							1,
 							block_size_samples/short_win_in_long, 
 							&sfb_offset_table[leftChan][0], 
 							nr_of_sfb[leftChan],
@@ -571,7 +571,7 @@
 							block_type[rightChan], 
 							WS_FHG,
 							block_size_samples,
-							0,
+							1,
 							block_size_samples/short_win_in_long, 
 							&sfb_offset_table[rightChan][0], 
 							nr_of_sfb[rightChan],
@@ -585,7 +585,7 @@
 					block_type[chanNum], 
 					WS_FHG,
 					block_size_samples,
-					0,
+					1,
 					block_size_samples/short_win_in_long, 
 					&sfb_offset_table[chanNum][0], 
 					nr_of_sfb[chanNum],
@@ -687,10 +687,12 @@
 		}
 
 		/* If short window, reconstruction not needed for prediction */
-		if ((block_type[chanNum]==ONLY_SHORT_WINDOW)) {
-			int sind;
-			for (sind=0;sind<1024;sind++) {
-				reconstructed_spectrum[chanNum][sind]=0.0;
+		for (chanNum=0;chanNum<max_ch;chanNum++) {
+			if ((block_type[chanNum]==ONLY_SHORT_WINDOW)) {
+				int sind;
+				for (sind=0;sind<1024;sind++) {
+					reconstructed_spectrum[chanNum][sind]=0.0;
+				}
 			}
 		}