ref: a8f04b23f97e42975c033e2f4d11e25498e9e6b8
parent: 74d43f0a3650c3122f6ec985a815f790f85e8000
author: Timothy B. Terriberry <[email protected]>
date: Mon Mar 18 10:42:44 EDT 2013
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.
--- 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)
{
--- 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)