Fix some 16-bit int issues in the multistream API.
With 120 ms frames and 6 or more channels, the total number of
samples in the buffer could overflow.
diff --git a/src/opus_multistream_decoder.c b/src/opus_multistream_decoder.c
index 47f87b1..495fb07 100644
--- a/src/opus_multistream_decoder.c
+++ b/src/opus_multistream_decoder.c
@@ -274,7 +274,7 @@
)
{
float *float_dst;
- int i;
+ opus_int32 i;
float_dst = (float*)dst;
if (src != NULL)
{
@@ -303,7 +303,7 @@
)
{
opus_int16 *short_dst;
- int i;
+ opus_int32 i;
short_dst = (opus_int16*)dst;
if (src != NULL)
{
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 66c75ca..1847bd5 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -356,7 +356,7 @@
)
{
const float *float_src;
- int i;
+ opus_int32 i;
float_src = (const float *)src;
for (i=0;i<frame_size;i++)
#if defined(FIXED_POINT)
@@ -377,7 +377,7 @@
)
{
const opus_int16 *short_src;
- int i;
+ opus_int32 i;
short_src = (const opus_int16 *)src;
for (i=0;i<frame_size;i++)
#if defined(FIXED_POINT)