diff options
author | Timothy B. Terriberry <tterribe@xiph.org> | 2013-03-18 14:42:44 -0700 |
---|---|---|
committer | Timothy B. Terriberry <tterribe@xiph.org> | 2013-03-18 14:42:44 -0700 |
commit | a8f04b23f97e42975c033e2f4d11e25498e9e6b8 (patch) | |
tree | b527b2585fb64e825f440ca8d4023a343cd3565f | |
parent | 74d43f0a3650c3122f6ec985a815f790f85e8000 (diff) | |
download | opus-a8f04b23f97e42975c033e2f4d11e25498e9e6b8.tar.gz |
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.
-rw-r--r-- | src/opus_multistream_decoder.c | 4 | ||||
-rw-r--r-- | src/opus_multistream_encoder.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/opus_multistream_decoder.c b/src/opus_multistream_decoder.c index 47f87b19..495fb07e 100644 --- a/src/opus_multistream_decoder.c +++ b/src/opus_multistream_decoder.c @@ -274,7 +274,7 @@ static void opus_copy_channel_out_float( ) { float *float_dst; - int i; + opus_int32 i; float_dst = (float*)dst; if (src != NULL) { @@ -303,7 +303,7 @@ static void opus_copy_channel_out_short( ) { 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 66c75ca1..1847bd5a 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -356,7 +356,7 @@ static void opus_copy_channel_in_float( ) { 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 @@ static void opus_copy_channel_in_short( ) { 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) |