Bug 1050947 - AudioStream::Pause() should do nothing when |mState| is ERRORED. r=kinetik

This commit is contained in:
JW Wang 2014-08-22 02:36:00 -04:00
Родитель 45467f29c0
Коммит 7a1eb3c738
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -915,6 +915,11 @@ void
AudioStream::Pause()
{
MonitorAutoLock mon(mMonitor);
if (mState == ERRORED) {
return;
}
if (!mCubebStream || (mState != STARTED && mState != RUNNING)) {
mNeedsStart = false;
mState = STOPPED; // which also tells async OpenCubeb not to start, just init