Bug 1121658 - Remove DestroyDecodedStream() from MediaDecoder::SetDormantIfNecessary() r=roc
authorSotaro Ikeda <sikeda@mozilla.com>
Fri, 16 Jan 2015 06:56:14 -0800
changeset 224204 56824531bfec29b5f4e9dcb4cd11d1eee8b27cba
parent 224203 ae2eec4a74ea1f8d323f6e09b56f7c07a2c94112
child 224205 7a80f8e49992a4bba5e1a6d769648b70b6cd840f
push id54152
push usersikeda@mozilla.com
push dateFri, 16 Jan 2015 14:56:33 +0000
treeherdermozilla-inbound@56824531bfec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1121658
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1121658 - Remove DestroyDecodedStream() from MediaDecoder::SetDormantIfNecessary() r=roc
dom/media/MediaDecoder.cpp
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -126,17 +126,16 @@ void MediaDecoder::SetDormantIfNecessary
   if (!mDecoderStateMachine ||
       !mDecoderStateMachine->IsDormantNeeded() ||
       mPlayState == PLAY_STATE_SHUTDOWN) {
     return;
   }
 
   if(aDormant) {
     // enter dormant state
-    DestroyDecodedStream();
     mDecoderStateMachine->SetDormant(true);
 
     int64_t timeUsecs = 0;
     SecondsToUsecs(mCurrentTime, timeUsecs);
     mRequestedSeekTarget = SeekTarget(timeUsecs, SeekTarget::Accurate);
 
     mNextState = mPlayState;
     ChangeState(PLAY_STATE_LOADING);
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1493,16 +1493,17 @@ void MediaDecoderStateMachine::SetDorman
       } else if (mCurrentSeekTarget.IsValid()) {
         mQueuedSeekTarget = mCurrentSeekTarget;
       }
     }
     mSeekTarget.Reset();
     mCurrentSeekTarget.Reset();
     ScheduleStateMachine();
     SetState(DECODER_STATE_DORMANT);
+    StopPlayback();
     mDecoder->GetReentrantMonitor().NotifyAll();
   } else if ((aDormant != true) && (mState == DECODER_STATE_DORMANT)) {
     mDecodingFrozenAtStateMetadata = true;
     mDecodingFrozenAtStateDecoding = true;
     ScheduleStateMachine();
     mCurrentFrameTime = 0;
     SetState(DECODER_STATE_DECODING_NONE);
     mDecoder->GetReentrantMonitor().NotifyAll();