mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 1353607. P6 - use TimeUnit in CheckSlowDecoding(). r=kikuo
MozReview-Commit-ID: 524aRA1uUaQ --HG-- extra : rebase_source : 9983ee9167c7e6420d7ebd529be8a985027c40d5 extra : intermediate-source : 56e1187c40b910d8cc233bd1dd86c963d0bdb249 extra : source : 29470ceae137940b6432a402249a56a82572adf0
This commit is contained in:
parent
1058fbba54
commit
285e8bf172
@ -815,13 +815,12 @@ private:
|
||||
}
|
||||
|
||||
TimeDuration decodeTime = TimeStamp::Now() - aDecodeStart;
|
||||
int64_t adjustedTime = THRESHOLD_FACTOR * DurationToUsecs(decodeTime);
|
||||
if (adjustedTime > mMaster->mLowAudioThreshold.ToMicroseconds()
|
||||
auto adjusted = TimeUnit::FromTimeDuration(decodeTime * THRESHOLD_FACTOR);
|
||||
if (adjusted > mMaster->mLowAudioThreshold
|
||||
&& !mMaster->HasLowBufferedData())
|
||||
{
|
||||
mMaster->mLowAudioThreshold = std::min(
|
||||
TimeUnit::FromMicroseconds(adjustedTime),
|
||||
mMaster->mAmpleAudioThreshold);
|
||||
adjusted, mMaster->mAmpleAudioThreshold);
|
||||
|
||||
mMaster->mAmpleAudioThreshold = std::max(
|
||||
mMaster->mLowAudioThreshold * THRESHOLD_FACTOR,
|
||||
|
Loading…
Reference in New Issue
Block a user