Bug 1197051 - Don't try to decode ahead while seeking - r=jya a=ritu
☠☠ backed out by 5bb661db5c6c ☠ ☠
authorEdwin Flores <edwin@mozilla.com>
Fri, 21 Aug 2015 17:24:18 +1000
changeset 288986 c45b13902e53e4b67e67914db6ee11abe42daa95
parent 288985 4c993f78e9f018c5576999a0512e0791151cc6d6
child 288987 c73d9e678d632e439710b7c2179c7f42e9f21c06
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya, ritu
bugs1197051
milestone42.0a2
Bug 1197051 - Don't try to decode ahead while seeking - r=jya a=ritu
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1735,17 +1735,17 @@ MediaDecoderStateMachine::RequestVideoDa
   // Time the video decode, so that if it's slow, we can increase our low
   // audio threshold to reduce the chance of an audio underrun while we're
   // waiting for a video decode to complete.
   mVideoDecodeStartTime = TimeStamp::Now();
 
   bool skipToNextKeyFrame = mSentFirstFrameLoadedEvent &&
     NeedToSkipToNextKeyframe();
   int64_t currentTime = mState == DECODER_STATE_SEEKING ? 0 : GetMediaTime();
-  bool forceDecodeAhead = mSentFirstFrameLoadedEvent &&
+  bool forceDecodeAhead = mSentFirstFrameLoadedEvent && !IsSeeking() &&
     static_cast<uint32_t>(VideoQueue().GetSize()) <= SCARCE_VIDEO_QUEUE_SIZE;
 
   SAMPLE_LOG("Queueing video task - queued=%i, decoder-queued=%o, skip=%i, time=%lld",
              VideoQueue().GetSize(), mReader->SizeOfVideoQueueInFrames(), skipToNextKeyFrame,
              currentTime);
 
   if (mSentFirstFrameLoadedEvent) {
     mVideoDataRequest.Begin(