Bug 1065827 - Start MediaDecoder playback state in LOADING. r=cpearce
☠☠ backed out by 6791ee4cd303 ☠ ☠
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 28 Oct 2014 20:10:08 +1100
changeset 214376 aebe859551b3c0a327060b43c22ba1461172b141
parent 214375 7822514901e6008021b06bad4d862fa7c62b7bcf
child 214377 44f27b3c35d47fe906b0ecf42c55de5d4cf0d56e
push id27780
push userkwierso@gmail.com
push dateFri, 07 Nov 2014 02:25:05 +0000
treeherdermozilla-central@e6d47abb6a7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1065827
milestone36.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 1065827 - Start MediaDecoder playback state in LOADING. r=cpearce
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -432,17 +432,17 @@ MediaDecoder::MediaDecoder() :
   mInitialPlaybackRate(1.0),
   mInitialPreservesPitch(true),
   mDuration(-1),
   mMediaSeekable(true),
   mSameOriginMedia(false),
   mReentrantMonitor("media.decoder"),
   mIsDormant(false),
   mIsExitingDormant(false),
-  mPlayState(PLAY_STATE_PAUSED),
+  mPlayState(PLAY_STATE_LOADING),
   mNextState(PLAY_STATE_PAUSED),
   mIgnoreProgressData(false),
   mInfiniteStream(false),
   mOwner(nullptr),
   mPlaybackStatistics(new MediaChannelStatistics()),
   mPinnedForSeek(false),
   mShuttingDown(false),
   mPausedForPlaybackRateNull(false),
@@ -557,18 +557,16 @@ nsresult MediaDecoder::InitializeStateMa
   nsresult rv = mDecoderStateMachine->Init(
       cloneDonor ? cloneDonor->mDecoderStateMachine : nullptr);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // If some parameters got set before the state machine got created,
   // set them now
   SetStateMachineParameters();
 
-  ChangeState(PLAY_STATE_LOADING);
-
   return ScheduleStateMachineThread();
 }
 
 void MediaDecoder::SetStateMachineParameters()
 {
   ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
   mDecoderStateMachine->SetDuration(mDuration);
   mDecoderStateMachine->SetVolume(mInitialVolume);