Bug 1114830 - Only enter buffering mode when the pending request is waiting for data. r=cpearce a=philor
authorBobby Holley <bobbyholley@gmail.com>
Mon, 22 Dec 2014 20:54:01 -0800
changeset 220952 0532f2509f3fa068f6c2d5b76f9627a62ddbecb5
parent 220951 8991815dd086e90539e00f53ceaebda31fcdfb0a
child 220967 bc71b49d9bf84045fbcecc6a9eec347073894264
push id28006
push userbobbyholley@gmail.com
push dateTue, 23 Dec 2014 04:54:35 +0000
treeherdermozilla-central@0532f2509f3f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, philor
bugs1114830
milestone37.0a1
first release with
nightly linux32
0532f2509f3f / 37.0a1 / 20141223030207 / files
nightly linux64
0532f2509f3f / 37.0a1 / 20141223030207 / files
nightly mac
0532f2509f3f / 37.0a1 / 20141223030207 / files
nightly win32
0532f2509f3f / 37.0a1 / 20141223030207 / files
nightly win64
0532f2509f3f / 37.0a1 / 20141223030207 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1114830 - Only enter buffering mode when the pending request is waiting for data. r=cpearce a=philor
dom/media/MediaDecoderStateMachine.cpp
dom/media/mediasource/test/mochitest.ini
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2953,17 +2953,18 @@ void MediaDecoderStateMachine::AdvanceFr
       mDecoder->GetState() == MediaDecoder::PLAY_STATE_PLAYING &&
       mDecoder->IsExpectingMoreData()) {
     bool shouldBuffer;
     if (mReader->UseBufferingHeuristics()) {
       shouldBuffer = HasLowDecodedData(remainingTime + EXHAUSTED_DATA_MARGIN_USECS) &&
                      (JustExitedQuickBuffering() || HasLowUndecodedData());
     } else {
       MOZ_ASSERT(mReader->IsWaitForDataSupported());
-      shouldBuffer = OutOfDecodedAudio() || OutOfDecodedVideo();
+      shouldBuffer = (OutOfDecodedAudio() && mAudioRequestStatus == RequestStatus::Waiting) ||
+                     (OutOfDecodedVideo() && mVideoRequestStatus == RequestStatus::Waiting);
     }
     if (shouldBuffer) {
       if (currentFrame) {
         VideoQueue().PushFront(currentFrame);
       }
       StartBuffering();
       // Don't go straight back to the state machine loop since that might
       // cause us to start decoding again and we could flip-flop between
--- a/dom/media/mediasource/test/mochitest.ini
+++ b/dom/media/mediasource/test/mochitest.ini
@@ -4,16 +4,17 @@ support-files =
   mediasource.js
   seek.webm seek.webm^headers^
   seek_lowres.webm seek_lowres.webm^headers^
 
 [test_MediaSource.html]
 [test_MediaSource_disabled.html]
 [test_BufferedSeek.html]
 [test_BufferingWait.html]
+skip-if = true # bug 1093133
 [test_EndOfStream.html]
 skip-if = (toolkit == 'android' || buildapp == 'mulet') #timeout android/mulet only bug 1101187
 [test_FrameSelection.html]
 [test_HaveMetadataUnbufferedSeek.html]
 [test_LoadedMetadataFired.html]
 [test_SeekableAfterEndOfStream.html]
 [test_SeekableAfterEndOfStreamSplit.html]
 [test_SeekableBeforeEndOfStream.html]