Bug 461286. Don't try to get more frames if we've completed decoding. r=roc
authorChris Double <chris.double@double.co.nz>
Tue, 19 May 2009 12:07:27 +1200
changeset 28532 850c33bb781479349d90065b78fdcd96291de9d4
parent 28531 9643e26f6ad07837dcaba7f93d60950ee7ca02b9
child 28533 3916d3b0b0b98757716b0dc895169b6781f7aed5
push id7108
push userrocallahan@mozilla.com
push dateTue, 19 May 2009 01:17:50 +0000
treeherdermozilla-central@058122b0bf3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs461286
milestone1.9.2a1pre
Bug 461286. Don't try to get more frames if we've completed decoding. r=roc
content/media/video/src/nsOggDecoder.cpp
--- a/content/media/video/src/nsOggDecoder.cpp
+++ b/content/media/video/src/nsOggDecoder.cpp
@@ -1220,17 +1220,17 @@ nsresult nsOggDecodeStateMachine::Run()
           mBufferExhausted = PR_FALSE;
           mDecodingCompleted = PR_FALSE;
           nsCOMPtr<nsIRunnable> event = new nsOggStepDecodeEvent(this, mPlayer);
           mStepDecodeThread->Dispatch(event, NS_DISPATCH_NORMAL);
         }
 
         // Get the decoded frames and store them in our queue of decoded frames
         QueueDecodedFrames();
-        while (mDecodedFrames.IsEmpty()) {
+        while (mDecodedFrames.IsEmpty() && !mDecodingCompleted) {
           mon.Wait(PR_MillisecondsToInterval(PRInt64(mCallbackPeriod*500)));
           if (mState != DECODER_STATE_DECODING)
             break;
           QueueDecodedFrames();
         }
 
         if (mState != DECODER_STATE_DECODING)
           continue;