shithub: opus-tools

Download patch

ref: 32a4066496e1211d986f6c9315e689bc12763d9f
parent: f8d9fe871304f06ac4b85115e8d15d3c2c1d4d1d
author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
date: Tue Aug 9 13:11:35 EDT 2011

header fixes from bemasc

--- a/src/opus_header.c
+++ b/src/opus_header.c
@@ -17,7 +17,7 @@
      - C times channel origin
           - if (C<2*M)
              - stream = byte/2
-             - if (byte&0x1)
+             - if (byte&0x1 == 0)
                  - left
                else
                  - right
@@ -149,7 +149,7 @@
       h->nb_coupled = ch;
       
       /* Multi-stream support */
-      for (i=0;i<h->nb_streams;i++)
+      for (i=0;i<h->channels;i++)
       {
          if (!read_chars(&p, &h->stream_map[i], 1))
             return 0;
@@ -201,7 +201,7 @@
          return 0;
 
       /* Multi-stream support */
-      for (i=0;i<h->nb_streams;i++)
+      for (i=0;i<h->channels;i++)
       {
          if (!write_chars(&p, &h->stream_map[i], 1))
             return 0;