Bug 1189138: [MSE] P1. Only seek to a position if the trackbuffer contains it. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 30 Jul 2015 12:20:47 +1000
changeset 287076 e35038771f2e896ea79d471552c89647bd39ad46
parent 287075 a6673a602500d6a360b413da8715886187d332ca
child 287077 e4ea0d56fcb6b593e6f9c304416a8acb7d676662
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)
reviewerscpearce
bugs1189138
milestone42.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 1189138: [MSE] P1. Only seek to a position if the trackbuffer contains it. r=cpearce Ignoring the time if it was 0 was a remnant on when Reset() used to call seek and meant to get to the first frame available. This is no longer relevant, DoSeek is only called when we are explicitly seeking.
dom/media/mediasource/MediaSourceDemuxer.cpp
--- a/dom/media/mediasource/MediaSourceDemuxer.cpp
+++ b/dom/media/mediasource/MediaSourceDemuxer.cpp
@@ -356,17 +356,17 @@ MediaSourceTrackDemuxer::BreakCycles()
       self->mManager = nullptr;
     } );
   mParent->GetTaskQueue()->Dispatch(task.forget());
 }
 
 nsRefPtr<MediaSourceTrackDemuxer::SeekPromise>
 MediaSourceTrackDemuxer::DoSeek(media::TimeUnit aTime)
 {
-  if (aTime.ToMicroseconds() && !mBufferedRanges.Contains(aTime)) {
+  if (!mBufferedRanges.Contains(aTime)) {
     // We don't have the data to seek to.
     return SeekPromise::CreateAndReject(DemuxerFailureReason::WAITING_FOR_DATA,
                                         __func__);
   }
   TimeUnit seekTime = mManager->Seek(mType, aTime);
   {
     MonitorAutoLock mon(mMonitor);
     mNextRandomAccessPoint = mManager->GetNextRandomAccessPoint(mType);