Bug 1546324 - use TimeUnit version modular. r=bryce
authorAlastor Wu <alwu@mozilla.com>
Wed, 24 Apr 2019 17:21:01 +0000
changeset 529517 1c7736806fe01eb90372bc9d4fa2ca988d5781ae
parent 529516 505d9ce41e464450f39affec12d52866dac39890
child 529518 d3ab16a95b9ceb70e0f4527c3e57885724c89428
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbryce
bugs1546324
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 1546324 - use TimeUnit version modular. r=bryce The value of `mAudioDecodedDuration` can be larger than `int32`, so we should use the modular function which accepts `TimeUnit`as a input. Differential Revision: https://phabricator.services.mozilla.com/D28536
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -3928,17 +3928,17 @@ void MediaDecoderStateMachine::CancelSus
   }
   mVideoDecodeSuspendTimer.Reset();
 }
 
 void MediaDecoderStateMachine::AdjustByLooping(media::TimeUnit& aTime) const {
   MOZ_ASSERT(OnTaskQueue());
   if (mAudioDecodedDuration.isSome() &&
       mAudioDecodedDuration.ref().IsPositive()) {
-    aTime = aTime % mAudioDecodedDuration.ref().ToMicroseconds();
+    aTime = aTime % mAudioDecodedDuration.ref();
   }
 }
 
 }  // namespace mozilla
 
 // avoid redefined macro in unified build
 #undef LOG
 #undef LOGV