The method AudioDeviceWindowsWave::RecProc can use uninitialized variables t1 and t2.
This results in an exception in debug mode and unpredictable behavior in release mode. The problem is at line 3514: // Calculate processing time consumedTime = (int)(t2.QuadPart-t1.QuadPart); Bug=http://code.google.com/p/webrtc/issues/detail?id=42 Test=none Review URL: http://webrtc-codereview.appspot.com/121002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@419 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
5895ea1573
commit
9d64705dea
@ -3510,11 +3510,13 @@ WebRtc_Word32 AudioDeviceWindowsWave::RecProc(LONGLONG& consumedTime)
|
||||
// increase main buffer count since one complete buffer has now been delivered
|
||||
_recBufCount++;
|
||||
|
||||
// Calculate processing time
|
||||
consumedTime = (int)(t2.QuadPart-t1.QuadPart);
|
||||
// handle wraps, time should not be higher than a second
|
||||
if ((consumedTime > _perfFreq.QuadPart) || (consumedTime < 0))
|
||||
consumedTime = 0;
|
||||
if (send) {
|
||||
// Calculate processing time
|
||||
consumedTime = (int)(t2.QuadPart-t1.QuadPart);
|
||||
// handle wraps, time should not be higher than a second
|
||||
if ((consumedTime > _perfFreq.QuadPart) || (consumedTime < 0))
|
||||
consumedTime = 0;
|
||||
}
|
||||
|
||||
} // if ((nBytesRecorded == fullBufferSizeInBytes))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user