Bug 1486565 - Don't initialize cubeb when recording/replaying, r=kinetik.

--HG--
extra : rebase_source : 7b6302026c1f64fa5e92f26bd6162d55888fcfe9
This commit is contained in:
Brian Hackett 2018-08-31 05:24:38 -10:00
Родитель 44f3ddf9d7
Коммит ecc7252452
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -421,6 +421,10 @@ cubeb* GetCubebContextUnlocked()
("%s: returning null context due to %s!", __func__, PREF_CUBEB_FORCE_NULL_CONTEXT)); ("%s: returning null context due to %s!", __func__, PREF_CUBEB_FORCE_NULL_CONTEXT));
return nullptr; return nullptr;
} }
if (recordreplay::IsRecordingOrReplaying()) {
// Media is not supported when recording or replaying. See bug 1304146.
return nullptr;
}
if (sCubebState != CubebState::Uninitialized) { if (sCubebState != CubebState::Uninitialized) {
// If we have already passed the initialization point (below), just return // If we have already passed the initialization point (below), just return
// the current context, which may be null (e.g., after error or shutdown.) // the current context, which may be null (e.g., after error or shutdown.)