Bug 815107 - Ensure AudioClock::mOldOutRate has sensible value, prevents audio clock position poisoning on one code path, and initialize AudioClock::mOldBasePosition to 0. r=padenot

This commit is contained in:
Chris Pearce 2012-12-11 09:43:04 +13:00
parent d4c7ea7a57
commit 3540cbded9

View File

@ -1050,6 +1050,7 @@ AudioClock::AudioClock(AudioStream* aStream)
mBasePosition(0),
mBaseOffset(0),
mOldBaseOffset(0),
mOldBasePosition(0),
mPlaybackRateChangeOffset(0),
mPreviousPosition(0),
mWritten(0),
@ -1065,6 +1066,7 @@ void AudioClock::Init()
mOutRate = mAudioStream->GetRate();
mInRate = mAudioStream->GetRate();
mPlaybackRate = 1.0;
mOldOutRate = mOutRate;
}
void AudioClock::UpdateWritePosition(uint32_t aCount)