зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1136827 - Call OnAudioSinkError on state machine thread. r=jww
This commit is contained in:
Родитель
ee4217303e
Коммит
01abf4455d
|
@ -162,8 +162,7 @@ AudioSink::AudioLoop()
|
|||
|
||||
if (NS_FAILED(InitializeAudioStream())) {
|
||||
NS_WARNING("Initializing AudioStream failed.");
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mStateMachine->OnAudioSinkError();
|
||||
mStateMachine->DispatchOnAudioSinkError();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -3455,7 +3455,8 @@ void MediaDecoderStateMachine::OnAudioSinkComplete()
|
|||
|
||||
void MediaDecoderStateMachine::OnAudioSinkError()
|
||||
{
|
||||
AssertCurrentThreadInMonitor();
|
||||
MOZ_ASSERT(OnStateMachineThread());
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
// AudioSink not used with captured streams, so ignore errors in this case.
|
||||
if (mAudioCaptured) {
|
||||
return;
|
||||
|
|
|
@ -718,6 +718,11 @@ protected:
|
|||
// Called by the AudioSink to signal errors.
|
||||
void OnAudioSinkError();
|
||||
|
||||
void DispatchOnAudioSinkError()
|
||||
{
|
||||
TaskQueue()->Dispatch(NS_NewRunnableMethod(this, &MediaDecoderStateMachine::OnAudioSinkError));
|
||||
}
|
||||
|
||||
// Return true if the video decoder's decode speed can not catch up the
|
||||
// play time.
|
||||
bool NeedToSkipToNextKeyframe();
|
||||
|
|
Загрузка…
Ссылка в новой задаче