Bug 1079174 - allow video playback when AudioStream init fails. r=kinetik

This commit is contained in:
JW Wang 2014-10-07 15:55:00 +02:00
Родитель 6c7ddd6c98
Коммит daa5cbe419
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -3143,7 +3143,13 @@ void MediaDecoderStateMachine::OnAudioSinkError()
mAudioCompleted = true;
// Notify media decoder/element about this error.
// Make the best effort to continue playback when there is video.
if (HasVideo()) {
return;
}
// Otherwise notify media decoder/element about this error for it makes
// no sense to play an audio-only file without sound output.
RefPtr<nsIRunnable> task(
NS_NewRunnableMethod(this, &MediaDecoderStateMachine::OnDecodeError));
nsresult rv = mDecodeTaskQueue->Dispatch(task);