зеркало из https://github.com/mozilla/gecko-dev.git
Bug 947431 - Be more robust when getting the preferred sample rate when using the OpenSL backend. r=kinetik
--HG-- extra : rebase_source : a55d98b9ce2cc6a9c2559d9589984faf8063c301
This commit is contained in:
Родитель
ab8787514a
Коммит
9c371ba053
|
@ -275,6 +275,14 @@ opensl_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate)
|
||||||
|
|
||||||
dlclose(libmedia);
|
dlclose(libmedia);
|
||||||
|
|
||||||
|
/* Depending on which method we called above, we can get a zero back, yet have
|
||||||
|
* a non-error return value, especially if the audio system is not
|
||||||
|
* ready/shutting down (i.e. when we can't get our hand on the AudioFlinger
|
||||||
|
* thread). */
|
||||||
|
if (rate == 0) {
|
||||||
|
return CUBEB_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
return CUBEB_OK;
|
return CUBEB_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче