Bug 1145815: Do not report discontinuities less than 35ms. r=k17e
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 25 Mar 2015 22:32:21 +1100
changeset 264639 6516456a0a6307f96fc366c8b8f3b596ff4a1019
parent 264638 7975148c93c9e8a547448b46f47d9e471f79507b
child 264640 ddf60eb38236d036ae1efa0765a57037eb52742f
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersk17e
bugs1145815
milestone39.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 1145815: Do not report discontinuities less than 35ms. r=k17e
dom/media/mediasource/ContainerParser.cpp
media/libstagefright/binding/MoofParser.cpp
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -333,21 +333,21 @@ public:
     }
     aStart = compositionRange.start;
     aEnd = compositionRange.end;
     MSE_DEBUG(MP4ContainerParser, "[%lld, %lld]",
               aStart, aEnd);
     return true;
   }
 
-  // Gaps of up to 20ms (marginally longer than a single frame at 60fps) are considered
+  // Gaps of up to 35ms (marginally longer than a single frame at 30fps) are considered
   // to be sequential frames.
   int64_t GetRoundingError()
   {
-    return 20000;
+    return 35000;
   }
 
 private:
   nsRefPtr<MP4Stream> mStream;
   nsAutoPtr<mp4_demuxer::MoofParser> mParser;
   Monitor mMonitor;
 };
 #endif
--- a/media/libstagefright/binding/MoofParser.cpp
+++ b/media/libstagefright/binding/MoofParser.cpp
@@ -236,17 +236,17 @@ MoofParser::ParseEncrypted(Box& aBox)
         break;
       }
     }
   }
 }
 
 Moof::Moof(Box& aBox, Trex& aTrex, Mdhd& aMdhd, Edts& aEdts, Sinf& aSinf, bool aIsAudio)
   : mRange(aBox.Range())
-  , mMaxRoundingError(0)
+  , mMaxRoundingError(35000)
 {
   for (Box box = aBox.FirstChild(); box.IsAvailable(); box = box.Next()) {
     if (box.IsType("traf")) {
       ParseTraf(box, aTrex, aMdhd, aEdts, aSinf, aIsAudio);
     }
   }
   if (IsValid()) {
     ProcessCenc();