зеркало из https://github.com/mozilla/pjs.git
Bug 557432 - Backed out changeset b64df24f4910
This commit is contained in:
Родитель
d2bef555bd
Коммит
dd488f9034
|
@ -933,8 +933,8 @@ nsresult nsOggPlayStateMachine::Run()
|
||||||
AdvanceFrame();
|
AdvanceFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HasAudio()) {
|
if (mAudioStream) {
|
||||||
// Close the audio stream so that next time audio is used a new stream
|
// Close the audop stream so that next time audio is used a new stream
|
||||||
// is created. The StopPlayback call also resets the IsPlaying() state
|
// is created. The StopPlayback call also resets the IsPlaying() state
|
||||||
// so audio is restarted correctly.
|
// so audio is restarted correctly.
|
||||||
StopPlayback(AUDIO_SHUTDOWN);
|
StopPlayback(AUDIO_SHUTDOWN);
|
||||||
|
@ -1125,16 +1125,9 @@ PRInt64
|
||||||
nsOggPlayStateMachine::GetAudioClock()
|
nsOggPlayStateMachine::GetAudioClock()
|
||||||
{
|
{
|
||||||
NS_ASSERTION(IsThread(mDecoder->mStateMachineThread), "Should be on state machine thread.");
|
NS_ASSERTION(IsThread(mDecoder->mStateMachineThread), "Should be on state machine thread.");
|
||||||
if (!HasAudio())
|
if (!mAudioStream || !HasAudio())
|
||||||
return -1;
|
return -1;
|
||||||
PRInt64 t;
|
PRInt64 t = mAudioStream->GetPosition();
|
||||||
{
|
|
||||||
MonitorAutoExit exitMon(mDecoder->GetMonitor());
|
|
||||||
MonitorAutoEnter audioMon(mAudioMonitor);
|
|
||||||
if (!mAudioStream)
|
|
||||||
return -1;
|
|
||||||
t = mAudioStream->GetPosition();
|
|
||||||
}
|
|
||||||
return (t == -1) ? -1 : t + mAudioStartTime;
|
return (t == -1) ? -1 : t + mAudioStartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче