Bug 1531241 - Ignore samples with no duration in buffered range index. r=padenot
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 28 Feb 2019 11:18:40 +0000
changeset 519594 a5c49f8dc2a0db9badab2f432f3b2e487634a399
parent 519593 8f8d66a61e23543ab5aa790e8a5a2996deaecaa7
child 519595 3f3479815becd6e2625472b3d3ac4d7c5a89727f
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1531241
milestone67.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 1531241 - Ignore samples with no duration in buffered range index. r=padenot Differential Revision: https://phabricator.services.mozilla.com/D21512
dom/media/mp4/Index.cpp
--- a/dom/media/mp4/Index.cpp
+++ b/dom/media/mp4/Index.cpp
@@ -404,17 +404,20 @@ Index::Index(const IndiceWrapper& aIndic
         return;
       }
       if (indice.sync || mIsAudio) {
         haveSync = true;
       }
       if (!haveSync) {
         continue;
       }
-
+      if (indice.start_composition == indice.end_composition) {
+        // Ignore this sample as it doesn't account for the buffered range.
+        continue;
+      }
       Sample sample;
       sample.mByteRange =
           MediaByteRange(indice.start_offset, indice.end_offset);
       sample.mCompositionRange = MP4Interval<Microseconds>(
           indice.start_composition, indice.end_composition);
       sample.mDecodeTime = indice.start_decode;
       sample.mSync = indice.sync || mIsAudio;
       // FIXME: Make this infallible after bug 968520 is done.