From 7a1eb3c738c7a50c2fa1d5dfbf64605fe24a7d07 Mon Sep 17 00:00:00 2001 From: JW Wang Date: Fri, 22 Aug 2014 02:36:00 -0400 Subject: [PATCH] Bug 1050947 - AudioStream::Pause() should do nothing when |mState| is ERRORED. r=kinetik --- content/media/AudioStream.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/media/AudioStream.cpp b/content/media/AudioStream.cpp index 04f1aaee5cc0..5092f02c2dcc 100644 --- a/content/media/AudioStream.cpp +++ b/content/media/AudioStream.cpp @@ -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