Bug 1124952 - Set request status to Pending in the special DecodeFirstFrame calls too. r=cpearce, a=sledru
authorBobby Holley <bobbyholley@gmail.com>
Mon, 26 Jan 2015 15:59:44 -0800
changeset 249474 1a54bd4e88b7d81449498f469c2986caba6a468d
parent 249473 071944a8e4e4758f818140a7af6616a07e1a5d3d
child 249475 bc4ccdc56652ac1c035a0fbf03deab2a3275888f
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, sledru
bugs1124952
milestone37.0a2
Bug 1124952 - Set request status to Pending in the special DecodeFirstFrame calls too. r=cpearce, a=sledru
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2296,23 +2296,25 @@ MediaDecoderStateMachine::DecodeFirstFra
     // We're resuming from dormant state, so we don't need to request
     // the first samples in order to determine the media start time,
     // we have the start time from last time we loaded.
     SetStartTime(mStartTime);
     nsresult res = FinishDecodeFirstFrame();
     NS_ENSURE_SUCCESS(res, res);
   } else {
     if (HasAudio()) {
+      mAudioRequestStatus = RequestStatus::Pending;
       ReentrantMonitorAutoExit unlock(mDecoder->GetReentrantMonitor());
       mReader->RequestAudioData()->Then(DecodeTaskQueue(), __func__, this,
                                         &MediaDecoderStateMachine::OnAudioDecoded,
                                         &MediaDecoderStateMachine::OnAudioNotDecoded);
     }
     if (HasVideo()) {
       mVideoDecodeStartTime = TimeStamp::Now();
+      mVideoRequestStatus = RequestStatus::Pending;
       ReentrantMonitorAutoExit unlock(mDecoder->GetReentrantMonitor());
       mReader->RequestVideoData(false, 0)
              ->Then(DecodeTaskQueue(), __func__, this,
                     &MediaDecoderStateMachine::OnVideoDecoded,
                     &MediaDecoderStateMachine::OnVideoNotDecoded);
     }
   }