Bug 1536766 - Assert that time always goes forward in DecodedStream. r=jya
☠☠ backed out by 41f1dcbe9caa ☠ ☠
authorAndreas Pehrson <apehrson@mozilla.com>
Thu, 18 Apr 2019 15:23:57 +0000
changeset 470100 199efe6aec594ef6d9f3c4c8af16b2e997a8bd51
parent 470099 f9d1f1bfe2b126dc1588e56724b860674519805a
child 470101 25f3a33ec51b06b14d8f5eef12ebc3afe4c21e88
push id35888
push useraiakab@mozilla.com
push dateFri, 19 Apr 2019 09:47:45 +0000
treeherdermozilla-central@0160424142d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1536766
milestone68.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 1536766 - Assert that time always goes forward in DecodedStream. r=jya Differential Revision: https://phabricator.services.mozilla.com/D27265
dom/media/mediasink/DecodedStream.cpp
--- a/dom/media/mediasink/DecodedStream.cpp
+++ b/dom/media/mediasink/DecodedStream.cpp
@@ -830,16 +830,17 @@ TimeUnit DecodedStream::GetPosition(Time
   if (aTimeStamp) {
     *aTimeStamp = TimeStamp::Now();
   }
   return mStartTime.ref() + mLastOutputTime;
 }
 
 void DecodedStream::NotifyOutput(int64_t aTime) {
   AssertOwnerThread();
+  MOZ_ASSERT(mLastOutputTime <= FromMicroseconds(aTime));
   mLastOutputTime = FromMicroseconds(aTime);
   auto currentTime = GetPosition();
 
   // Remove audio samples that have been played by MSG from the queue.
   RefPtr<AudioData> a = mAudioQueue.PeekFront();
   for (; a && a->mTime < currentTime;) {
     RefPtr<AudioData> releaseMe = mAudioQueue.PopFront();
     a = mAudioQueue.PeekFront();