Loading content/media/nsBuiltinDecoderStateMachine.cpp +44 −38 Original line number Diff line number Diff line Loading @@ -1146,6 +1146,8 @@ void nsBuiltinDecoderStateMachine::AudioLoop() mAudioEndTime = playedUsecs.value(); } } { ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); if (mReader->mAudioQueue.AtEndOfStream() && mState != DECODER_STATE_SHUTDOWN && !mStopAudioThread) Loading @@ -1154,7 +1156,6 @@ void nsBuiltinDecoderStateMachine::AudioLoop() // before the audio thread terminates. bool seeking = false; { ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); PRInt64 unplayedFrames = audioDuration % minWriteFrames; if (minWriteFrames > 1 && unplayedFrames > 0) { // Sound is written by libsydneyaudio to the hardware in blocks of Loading @@ -1167,6 +1168,7 @@ void nsBuiltinDecoderStateMachine::AudioLoop() if (framesToWrite < PR_UINT32_MAX / channels) { // Write silence manually rather than using PlaySilence(), so that // the AudioAPI doesn't get a copy of the audio frames. ReentrantMonitorAutoExit exit(mDecoder->GetReentrantMonitor()); WriteSilence(mAudioStream, framesToWrite); } } Loading @@ -1187,11 +1189,15 @@ void nsBuiltinDecoderStateMachine::AudioLoop() } if (!seeking && !mAudioStream->IsPaused()) { { ReentrantMonitorAutoExit exit(mDecoder->GetReentrantMonitor()); mAudioStream->Drain(); } // Fire one last event for any extra frames that didn't fill a framebuffer. mEventManager.Drain(mAudioEndTime); } } } LOG(PR_LOG_DEBUG, ("%p Reached audio stream end.", mDecoder.get())); { // Must hold lock while anulling the audio stream to prevent Loading Loading
content/media/nsBuiltinDecoderStateMachine.cpp +44 −38 Original line number Diff line number Diff line Loading @@ -1146,6 +1146,8 @@ void nsBuiltinDecoderStateMachine::AudioLoop() mAudioEndTime = playedUsecs.value(); } } { ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); if (mReader->mAudioQueue.AtEndOfStream() && mState != DECODER_STATE_SHUTDOWN && !mStopAudioThread) Loading @@ -1154,7 +1156,6 @@ void nsBuiltinDecoderStateMachine::AudioLoop() // before the audio thread terminates. bool seeking = false; { ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); PRInt64 unplayedFrames = audioDuration % minWriteFrames; if (minWriteFrames > 1 && unplayedFrames > 0) { // Sound is written by libsydneyaudio to the hardware in blocks of Loading @@ -1167,6 +1168,7 @@ void nsBuiltinDecoderStateMachine::AudioLoop() if (framesToWrite < PR_UINT32_MAX / channels) { // Write silence manually rather than using PlaySilence(), so that // the AudioAPI doesn't get a copy of the audio frames. ReentrantMonitorAutoExit exit(mDecoder->GetReentrantMonitor()); WriteSilence(mAudioStream, framesToWrite); } } Loading @@ -1187,11 +1189,15 @@ void nsBuiltinDecoderStateMachine::AudioLoop() } if (!seeking && !mAudioStream->IsPaused()) { { ReentrantMonitorAutoExit exit(mDecoder->GetReentrantMonitor()); mAudioStream->Drain(); } // Fire one last event for any extra frames that didn't fill a framebuffer. mEventManager.Drain(mAudioEndTime); } } } LOG(PR_LOG_DEBUG, ("%p Reached audio stream end.", mDecoder.get())); { // Must hold lock while anulling the audio stream to prevent Loading