Bug 1109437 - Schedule the state machine thread in MediaSourceDecoder::Load. r=cpearce
☠☠ backed out by b6db7735f698 ☠ ☠
authorBobby Holley <bobbyholley@gmail.com>
Fri, 19 Dec 2014 11:39:15 -0800
changeset 246527 4c38dda0688052e7074c04a7a25065cb7e3246c6
parent 246526 72f171ec04bad38d43a39545fe7804dbf42fd94d
child 246528 e6350e4fb18ba8198a7f4913954a0e4b2b8d3782
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1109437
milestone37.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 1109437 - Schedule the state machine thread in MediaSourceDecoder::Load. r=cpearce This is necessary to get the state machine moving after it's initialized. MediaDecoder::Load does this, but it looks like we missed this in the override. So the current code relies on the ScheduleStateMachine call at the end of TrackBuffer::AppendData to get things rolling. We're going to be removing that call, so we need to fix this.
dom/media/mediasource/MediaSourceDecoder.cpp
--- a/dom/media/mediasource/MediaSourceDecoder.cpp
+++ b/dom/media/mediasource/MediaSourceDecoder.cpp
@@ -61,18 +61,17 @@ MediaSourceDecoder::Load(nsIStreamListen
     NS_WARNING("Failed to create state machine!");
     return NS_ERROR_FAILURE;
   }
 
   nsresult rv = mDecoderStateMachine->Init(nullptr);
   NS_ENSURE_SUCCESS(rv, rv);
 
   SetStateMachineParameters();
-
-  return NS_OK;
+  return ScheduleStateMachineThread();
 }
 
 nsresult
 MediaSourceDecoder::GetSeekable(dom::TimeRanges* aSeekable)
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (!mMediaSource) {
     return NS_ERROR_FAILURE;