Bug 1124952 - Set request status to Pending in the special DecodeFirstFrame calls too. r=cpearce
authorBobby Holley <bobbyholley@gmail.com>
Mon, 26 Jan 2015 15:59:44 -0800
changeset 239216 139b3e52f9fe998d6165375096743e1fd339af41
parent 239215 b456ab25b529f0f1c9dfb1e37f70649ca3ee4b65
child 239217 7971981a6000a0b92f4d2237745f3a3d052b0a2c
push id489
push usermcmanus@ducksong.com
push dateTue, 27 Jan 2015 01:44:53 +0000
reviewerscpearce
bugs1124952
milestone38.0a1
Bug 1124952 - Set request status to Pending in the special DecodeFirstFrame calls too. r=cpearce
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);
     }
   }