Properly skip padding in testcelt for stereo.
authorTimothy B. Terriberry <tterribe@xiph.org>
Mon, 10 Jan 2011 04:04:12 +0000 (20:04 -0800)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Mon, 10 Jan 2011 04:08:15 +0000 (23:08 -0500)
The right amount of data was being written for the first frame, but
 from the wrong offset in the buffer.

libcelt/testcelt.c

index 6bfd0dd..187ea1a 100644 (file)
@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
       }
 #endif
       count++;
-      fwrite(out+skip, sizeof(short), (frame_size-skip)*channels, fout);
+      fwrite(out+skip*channels, sizeof(short), (frame_size-skip)*channels, fout);
       skip = 0;
    }
    PRINT_MIPS(stderr);