Skip to content

Commit

Permalink
Bug 1546324 - use TimeUnit version modular. r=bryce
Browse files Browse the repository at this point in the history
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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
alastor0325 committed Apr 24, 2019
1 parent 044d488 commit 1df4ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dom/media/MediaDecoderStateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3933,7 +3933,7 @@ 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();
}
}

Expand Down

0 comments on commit 1df4ea3

Please sign in to comment.