Bug 1197051 - Don't try to decode ahead while seeking - r=jya a=ritu
authorEdwin Flores <edwin@mozilla.com>
Fri, 21 Aug 2015 17:24:18 +1000
changeset 289188 63c926f0052f657448bdb864d67fe7bd778729da
parent 289187 1bf5bcc0f4262d56d0bb0b50ff97a81c807e3b23
child 289189 39f176bfb26a928d351cb7b02556cb651fb2c52c
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(