From 27960244ba59c28de9ee802112a9e612bc815f1d Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Fri, 9 Apr 2010 16:33:07 +1200 Subject: [PATCH] Bug 557432 - Backed out changeset b64df24f4910 --- content/media/ogg/nsOggPlayStateMachine.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/content/media/ogg/nsOggPlayStateMachine.cpp b/content/media/ogg/nsOggPlayStateMachine.cpp index 2adf75a1bdc6..bc89c45f7dec 100644 --- a/content/media/ogg/nsOggPlayStateMachine.cpp +++ b/content/media/ogg/nsOggPlayStateMachine.cpp @@ -933,8 +933,8 @@ nsresult nsOggPlayStateMachine::Run() AdvanceFrame(); } - if (HasAudio()) { - // Close the audio stream so that next time audio is used a new stream + if (mAudioStream) { + // Close the audop stream so that next time audio is used a new stream // is created. The StopPlayback call also resets the IsPlaying() state // so audio is restarted correctly. StopPlayback(AUDIO_SHUTDOWN); @@ -1125,16 +1125,9 @@ PRInt64 nsOggPlayStateMachine::GetAudioClock() { NS_ASSERTION(IsThread(mDecoder->mStateMachineThread), "Should be on state machine thread."); - if (!HasAudio()) + if (!mAudioStream || !HasAudio()) return -1; - PRInt64 t; - { - MonitorAutoExit exitMon(mDecoder->GetMonitor()); - MonitorAutoEnter audioMon(mAudioMonitor); - if (!mAudioStream) - return -1; - t = mAudioStream->GetPosition(); - } + PRInt64 t = mAudioStream->GetPosition(); return (t == -1) ? -1 : t + mAudioStartTime; }