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:
Paul Adenot 2013-12-12 18:35:39 +01:00
Родитель ab8787514a
Коммит 9c371ba053
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -275,6 +275,14 @@ opensl_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate)
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;
}