Bug 1134064: Part3. Don't evict partial data and make resource unplayable. r=k17e a=lmandel
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 20 Feb 2015 14:19:14 +1300
changeset 240862 cbf454c3c189e9930713c5c0129657c72b706143
parent 240861 23b7642864e2d17dd842b6cdf3b8f942d609de4a
child 240863 050e1d7b5246886dd76187172f083a8d06e17459
push id7674
push userrgiles@mozilla.com
push dateMon, 23 Feb 2015 08:08:48 +0000
treeherdermozilla-aurora@419b32569a76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersk17e, lmandel
bugs1134064
milestone37.0a2
Bug 1134064: Part3. Don't evict partial data and make resource unplayable. r=k17e a=lmandel
media/libstagefright/binding/mp4_demuxer.cpp
--- a/media/libstagefright/binding/mp4_demuxer.cpp
+++ b/media/libstagefright/binding/mp4_demuxer.cpp
@@ -330,17 +330,17 @@ MP4Demuxer::GetEvictionOffset(Microsecon
   if (mPrivate->mIndexes.IsEmpty()) {
     return 0;
   }
 
   uint64_t offset = std::numeric_limits<uint64_t>::max();
   for (int i = 0; i < mPrivate->mIndexes.Length(); i++) {
     offset = std::min(offset, mPrivate->mIndexes[i]->GetEvictionOffset(aTime));
   }
-  return offset == std::numeric_limits<uint64_t>::max() ? -1 : offset;
+  return offset == std::numeric_limits<uint64_t>::max() ? 0 : offset;
 }
 
 Microseconds
 MP4Demuxer::GetNextKeyframeTime()
 {
   mMonitor->AssertCurrentThreadOwns();
   if (!mPrivate->mVideoIterator) {
     return -1;