Bug 1234778: Mark all audio frames as keyframes. r=kentuckyfriedtakahe
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 24 Dec 2015 01:06:45 +1100
changeset 277518 51354eb12581463720040d5e198b8d5e00d38e8d
parent 277517 42939c23673ed28b73d6154fe01e71d1740ccc27
child 277519 200ab9a3b18aa2d0ad6fa2834f5191b009671232
push id69508
push userjyavenard@mozilla.com
push dateWed, 23 Dec 2015 22:06:16 +0000
treeherdermozilla-inbound@51354eb12581 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskentuckyfriedtakahe
bugs1234778
milestone46.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 1234778: Mark all audio frames as keyframes. r=kentuckyfriedtakahe
media/libstagefright/binding/Index.cpp
--- a/media/libstagefright/binding/Index.cpp
+++ b/media/libstagefright/binding/Index.cpp
@@ -249,30 +249,30 @@ Index::Index(const nsTArray<Indice>& aIn
     }
     media::IntervalSet<int64_t> intervalTime;
     MediaByteRange intervalRange;
     bool haveSync = false;
     bool progressive = true;
     int64_t lastOffset = 0;
     for (size_t i = 0; i < aIndex.Length(); i++) {
       const Indice& indice = aIndex[i];
-      if (indice.sync) {
+      if (indice.sync || mIsAudio) {
         haveSync = true;
       }
       if (!haveSync) {
         continue;
       }
 
       Sample sample;
       sample.mByteRange = MediaByteRange(indice.start_offset,
                                          indice.end_offset);
       sample.mCompositionRange = Interval<Microseconds>(indice.start_composition,
                                                         indice.end_composition);
       sample.mDecodeTime = indice.start_decode;
-      sample.mSync = indice.sync;
+      sample.mSync = indice.sync || mIsAudio;
       // FIXME: Make this infallible after bug 968520 is done.
       MOZ_ALWAYS_TRUE(mIndex.AppendElement(sample, fallible));
       if (indice.start_offset < lastOffset) {
         NS_WARNING("Chunks in MP4 out of order, expect slow down");
         progressive = false;
       }
       lastOffset = indice.end_offset;