Bug 1163227: Part4. Fix MP4TrackDemuxer eviction offset calculations. r=mattwoodrow
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 25 May 2015 15:09:16 +1000
changeset 245447 a0dcad6b9a4a7ec4cf26f71234c2365bcf6ca6be
parent 245446 6ddd55a8331c48017c5d1d86917f5b974835c855
child 245448 6d38104707a18e395d4cd12a2ead1107b839031c
push id28806
push userphilringnalda@gmail.com
push dateTue, 26 May 2015 02:10:16 +0000
treeherdermozilla-central@4362d9251296 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1163227
milestone41.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 1163227: Part4. Fix MP4TrackDemuxer eviction offset calculations. r=mattwoodrow
dom/media/fmp4/MP4Demuxer.cpp
--- a/dom/media/fmp4/MP4Demuxer.cpp
+++ b/dom/media/fmp4/MP4Demuxer.cpp
@@ -293,17 +293,18 @@ MP4TrackDemuxer::SkipToNextRandomAccessP
     return SkipAccessPointPromise::CreateAndReject(Move(failure), __func__);
   }
 }
 
 int64_t
 MP4TrackDemuxer::GetEvictionOffset(media::TimeUnit aTime)
 {
   MonitorAutoLock mon(mMonitor);
-  return int64_t(mIndex->GetEvictionOffset(aTime.ToMicroseconds()));
+  uint64_t offset = mIndex->GetEvictionOffset(aTime.ToMicroseconds());
+  return int64_t(offset == std::numeric_limits<uint64_t>::max() ? 0 : offset);
 }
 
 media::TimeIntervals
 MP4TrackDemuxer::GetBuffered()
 {
   AutoPinned<MediaResource> resource(mParent->mResource);
   nsTArray<MediaByteRange> byteRanges;
   nsresult rv = resource->GetCachedRanges(byteRanges);