зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1361336 - part2: Prevent AudioStream::ResetDefaultDevice() from being called before stream is started; r=cpearce,kinetik
--HG-- extra : rebase_source : 95030be6e9ce493b6d42e837f9a7e652907836a8
This commit is contained in:
Родитель
bfe0bce52c
Коммит
7d076c3ac2
|
@ -478,6 +478,11 @@ void
|
|||
AudioStream::ResetDefaultDevice()
|
||||
{
|
||||
MonitorAutoLock mon(mMonitor);
|
||||
if (mState != STARTED && mState != STOPPED) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mCubebStream);
|
||||
auto r = InvokeCubeb(cubeb_stream_reset_default_device);
|
||||
if (!(r == CUBEB_OK || r == CUBEB_ERROR_NOT_SUPPORTED)) {
|
||||
mState = ERRORED;
|
||||
|
|
Загрузка…
Ссылка в новой задаче