зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1434477 - If AudioCallbackDriver::Init() can't get a cubeb context, fall back to system clock driver. r=padenot
Change AudioCallbackDriver::Init() to fallback to a system clock driver if a cubeb context can not be obtained. This should make driver init more robust in cases where cubeb init fails and then CubebUtils::GetCubebContext() returns no context. MozReview-Commit-ID: IlFPytYacoI --HG-- extra : rebase_source : 7445ceb49583ee3ae399252e995ce6f012d9da2f
This commit is contained in:
Родитель
70d6e49a13
Коммит
978c69f8d4
|
@ -593,10 +593,13 @@ AudioCallbackDriver::Init()
|
|||
cubeb* cubebContext = CubebUtils::GetCubebContext();
|
||||
if (!cubebContext) {
|
||||
NS_WARNING("Could not get cubeb context.");
|
||||
LOG(LogLevel::Warning, ("%s: Could not get cubeb context", __func__));
|
||||
if (!mFromFallback) {
|
||||
CubebUtils::ReportCubebStreamInitFailure(true);
|
||||
}
|
||||
return false;
|
||||
MonitorAutoLock lock(GraphImpl()->GetMonitor());
|
||||
FallbackToSystemClockDriver();
|
||||
return true;
|
||||
}
|
||||
|
||||
cubeb_stream_params output;
|
||||
|
|
Загрузка…
Ссылка в новой задаче