proper stereo handling for multiple frames per packet
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 5 Jul 2011 21:06:43 +0000 (17:06 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 5 Jul 2011 21:06:43 +0000 (17:06 -0400)
src/opus_decoder.c

index 7e32b09..d71282c 100644 (file)
@@ -524,7 +524,7 @@ int opus_decode(OpusDecoder *st, const unsigned char *data,
                if (ret<0)
                        return ret;
                data += size[i];
-               pcm += ret;
+               pcm += ret*st->channels;
                nb_samples += ret;
        }
        return nb_samples;