Bug 1535493 - [MSE] Lower HAVE_ENOUGH_DATA threshold to 3s. r=pehrsons
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 15 Mar 2019 12:34:07 +0000
changeset 464378 fcb88149296d6ff80ebfb29a8f4d20e2113e45e3
parent 464377 e7f1772b47962f1038b749256929167416e5b06b
child 464379 c1674c1e4e7c7ceff1f4ac15943b0cf573d57abd
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons
bugs1535493
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1535493 - [MSE] Lower HAVE_ENOUGH_DATA threshold to 3s. r=pehrsons Differential Revision: https://phabricator.services.mozilla.com/D23658
dom/media/mediasource/MediaSourceDecoder.cpp
--- a/dom/media/mediasource/MediaSourceDecoder.cpp
+++ b/dom/media/mediasource/MediaSourceDecoder.cpp
@@ -283,22 +283,22 @@ bool MediaSourceDecoder::CanPlayThroughI
     // Don't have any data yet.
     return false;
   }
   TimeUnit duration = TimeUnit::FromSeconds(mMediaSource->Duration());
   auto currentPosition = CurrentPosition();
   if (duration <= currentPosition) {
     return true;
   }
-  // If we have data up to the mediasource's duration or 10s ahead, we can
+  // If we have data up to the mediasource's duration or 3s ahead, we can
   // assume that we can play without interruption.
   TimeIntervals buffered = GetBuffered();
   buffered.SetFuzz(MediaSourceDemuxer::EOS_FUZZ / 2);
   TimeUnit timeAhead =
-      std::min(duration, currentPosition + TimeUnit::FromSeconds(10));
+      std::min(duration, currentPosition + TimeUnit::FromSeconds(3));
   TimeInterval interval(currentPosition, timeAhead);
   return buffered.ContainsWithStrictEnd(ClampIntervalToEnd(interval));
 }
 
 TimeInterval MediaSourceDecoder::ClampIntervalToEnd(
     const TimeInterval& aInterval) {
   MOZ_ASSERT(NS_IsMainThread());
   AbstractThread::AutoEnter context(AbstractMainThread());