[iortcw] 06/497: All: Fix SCR_UpdateScreen crash from VOIP
Simon McVittie
smcv at debian.org
Wed Sep 21 19:46:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.42d
in repository iortcw.
commit 0b49c4d5c908d036a8ae3e125a0b90cd3d7df715
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date: Wed Jan 15 03:30:19 2014 +0000
All: Fix SCR_UpdateScreen crash from VOIP
---
MP/code/client/cl_parse.c | 4 ++--
SP/code/client/cl_parse.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/MP/code/client/cl_parse.c b/MP/code/client/cl_parse.c
index e3cc8c6..dadbaea 100644
--- a/MP/code/client/cl_parse.c
+++ b/MP/code/client/cl_parse.c
@@ -920,7 +920,7 @@ void CL_ParseVoip ( msg_t *msg, qboolean ignoreData ) {
// tell opus that we're missing frames...
for (i = 0; i < seqdiff; i++) {
assert((written + VOIP_MAX_PACKET_SAMPLES) * 2 < sizeof (decoded));
- numSamples = opus_decode(clc.opusDecoder[sender], NULL, VOIP_MAX_PACKET_SAMPLES * 2, decoded + written, sizeof (decoded) - written, 0);
+ numSamples = opus_decode(clc.opusDecoder[sender], NULL, 0, decoded + written, VOIP_MAX_PACKET_SAMPLES, 0);
if ( numSamples <= 0 ) {
Com_DPrintf("VoIP: Error decoding frame %d from client #%d\n", i, sender);
continue;
@@ -929,7 +929,7 @@ void CL_ParseVoip ( msg_t *msg, qboolean ignoreData ) {
}
}
- numSamples = opus_decode(clc.opusDecoder[sender], encoded, packetsize, decoded + written, sizeof (decoded) - written, 0);
+ numSamples = opus_decode(clc.opusDecoder[sender], encoded, packetsize, decoded + written, ARRAY_LEN(decoded) - written, 0);
if ( numSamples <= 0 ) {
Com_DPrintf("VoIP: Error decoding voip data from client #%d\n", sender);
diff --git a/SP/code/client/cl_parse.c b/SP/code/client/cl_parse.c
index fc200b2..4f28fb7 100644
--- a/SP/code/client/cl_parse.c
+++ b/SP/code/client/cl_parse.c
@@ -787,7 +787,7 @@ void CL_ParseVoip ( msg_t *msg, qboolean ignoreData ) {
// tell opus that we're missing frames...
for (i = 0; i < seqdiff; i++) {
assert((written + VOIP_MAX_PACKET_SAMPLES) * 2 < sizeof (decoded));
- numSamples = opus_decode(clc.opusDecoder[sender], NULL, VOIP_MAX_PACKET_SAMPLES * 2, decoded + written, sizeof (decoded) - written, 0);
+ numSamples = opus_decode(clc.opusDecoder[sender], NULL, 0, decoded + written, VOIP_MAX_PACKET_SAMPLES, 0);
if ( numSamples <= 0 ) {
Com_DPrintf("VoIP: Error decoding frame %d from client #%d\n", i, sender);
continue;
@@ -796,7 +796,7 @@ void CL_ParseVoip ( msg_t *msg, qboolean ignoreData ) {
}
}
- numSamples = opus_decode(clc.opusDecoder[sender], encoded, packetsize, decoded + written, sizeof (decoded) - written, 0);
+ numSamples = opus_decode(clc.opusDecoder[sender], encoded, packetsize, decoded + written, ARRAY_LEN(decoded) - written, 0);
if ( numSamples <= 0 ) {
Com_DPrintf("VoIP: Error decoding voip data from client #%d\n", sender);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list