shithub: opus

Download patch

ref: 245c9af59d68b2dfadd1bc2c0db9d1f13857a1cc
parent: 08b88c8d3d355d1c3e48d2041eaa51de7e30b505
author: Timothy B. Terriberry <[email protected]>
date: Thu Aug 5 12:30:42 EDT 2010

Fix dump_modes when requesting multiple modes.

dump_modes() was re-using a loop index for a loop nested inside
 the main one, so it would only output the struct for the first
 one.

--- a/libcelt/dump_modes.c
+++ b/libcelt/dump_modes.c
@@ -152,8 +152,8 @@
       fprintf(file, "%d,\t/* nbEBands */\n", mode->nbEBands);
       fprintf(file, "%d,\t/* effEBands */\n", mode->effEBands);
       fprintf(file, "{");
-      for (i=0;i<4;i++)
-         fprintf(file, WORD16 ", ", mode->preemph[i]);
+      for (j=0;j<4;j++)
+         fprintf(file, WORD16 ", ", mode->preemph[j]);
       fprintf(file, "},\t/* preemph */\n");
       fprintf(file, "eBands%d_%d,\t/* eBands */\n", mode->Fs, mdctSize);
       fprintf(file, "%d,\t/* nbAllocVectors */\n", mode->nbAllocVectors);