Bug 1180403 - Part 1: Ensure buffered index is up to date. r=cpearce, a=kglazko
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 08 Jul 2015 13:07:09 +1000
changeset 268797 477a7f5576a309625f52859914182764fc8253aa
parent 268796 8cfc3238ee5e0827b237a75e55cbd5367f97e4b1
child 268798 7b9fc4d2ae3770670f46774bae88f1a5f22c379a
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, kglazko
bugs1180403
milestone41.0a2
Bug 1180403 - Part 1: Ensure buffered index is up to date. r=cpearce, a=kglazko
dom/media/fmp4/MP4Demuxer.cpp
--- a/dom/media/fmp4/MP4Demuxer.cpp
+++ b/dom/media/fmp4/MP4Demuxer.cpp
@@ -320,16 +320,17 @@ MP4TrackDemuxer::SkipToNextRandomAccessP
     SkipFailureHolder failure(DemuxerFailureReason::END_OF_STREAM, parsed);
     return SkipAccessPointPromise::CreateAndReject(Move(failure), __func__);
   }
 }
 
 int64_t
 MP4TrackDemuxer::GetEvictionOffset(media::TimeUnit aTime)
 {
+  EnsureUpToDateIndex();
   MonitorAutoLock mon(mMonitor);
   uint64_t offset = mIndex->GetEvictionOffset(aTime.ToMicroseconds());
   return int64_t(offset == std::numeric_limits<uint64_t>::max() ? 0 : offset);
 }
 
 media::TimeIntervals
 MP4TrackDemuxer::GetBuffered()
 {