Bug 959022 - Add data-offset-present in traf box. r=cpearce
authorAlfredo Yang <ayang@mozilla.com>
Mon, 13 Jan 2014 08:28:26 -0500
changeset 163126 e6d9c993948eba37c90887eb8b05fa6d38ab38c8
parent 163125 92f05bd3d5da98f174ece9fca98d6faf99a6ddf5
child 163127 0445456b397c1ac4f675e682800c8bb880892e9e
push id25982
push userryanvm@gmail.com
push dateMon, 13 Jan 2014 22:30:39 +0000
treeherdermozilla-central@d524c4b2cbb8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs959022
milestone29.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 959022 - Add data-offset-present in traf box. r=cpearce
content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp
--- a/content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp
+++ b/content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp
@@ -319,20 +319,23 @@ MovieFragmentHeaderBox::~MovieFragmentHe
   MOZ_COUNT_DTOR(MovieFragmentHeaderBox);
 }
 
 MovieFragmentBox::MovieFragmentBox(uint32_t aType, ISOControl* aControl)
   : DefaultContainerImpl(NS_LITERAL_CSTRING("moof"), aControl)
   , mTrackType(aType)
 {
   boxes.AppendElement(new MovieFragmentHeaderBox(mTrackType, aControl));
+
+  // Always adds flags_data_offset_present in each TrackFragmentBox, Android
+  // parser requires this flag to calculate the correct bitstream offset.
   if (mTrackType & Audio_Track) {
     boxes.AppendElement(
       new TrackFragmentBox(Audio_Track,
-                           flags_sample_size_present,
+                           flags_sample_size_present | flags_data_offset_present,
                            aControl));
   }
   if (mTrackType & Video_Track) {
     boxes.AppendElement(
       new TrackFragmentBox(Video_Track,
                            flags_sample_size_present | flags_data_offset_present,
                            aControl));
   }