Bug 1350178 - Get stagefright indices only when rust parser is off or TestMode is on for saving memory usage. r=kinetik
authorAlfredo.Yang <ayang@mozilla.com>
Thu, 23 Mar 2017 14:23:36 +0800
changeset 349372 603c4b701a67cc1e029f7667bd7a46eca80b98bd
parent 349371 c0a377462d475c95e723e0905f01c90b4172aa86
child 349373 8e366bd6d5f4c5bcd949498f7cf1a5df58ae08de
push id31550
push usercbook@mozilla.com
push dateFri, 24 Mar 2017 13:22:27 +0000
treeherdermozilla-central@473e0b201761 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1350178
milestone55.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 1350178 - Get stagefright indices only when rust parser is off or TestMode is on for saving memory usage. r=kinetik MozReview-Commit-ID: F9P9O8YHJWg
media/libstagefright/binding/MP4Metadata.cpp
--- a/media/libstagefright/binding/MP4Metadata.cpp
+++ b/media/libstagefright/binding/MP4Metadata.cpp
@@ -417,17 +417,18 @@ MP4Metadata::Crypto() const
 
   return crypto;
 }
 
 mozilla::UniquePtr<IndiceWrapper>
 MP4Metadata::GetTrackIndice(mozilla::TrackID aTrackID)
 {
   FallibleTArray<Index::Indice> indiceSF;
-  if(!mStagefright->ReadTrackIndex(indiceSF, aTrackID)) {
+  if ((!mPreferRust || mRustTestMode) &&
+       !mStagefright->ReadTrackIndex(indiceSF, aTrackID)) {
     return nullptr;
   }
 
   mp4parse_byte_data indiceRust = {};
   if ((mPreferRust || mRustTestMode) &&
       !mRust->ReadTrackIndice(&indiceRust, aTrackID)) {
     return nullptr;
   }