mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Use longs to avoid intger overflow
PiperOrigin-RevId: 347351440
This commit is contained in:
parent
4907cf877a
commit
5aac1898bb
1 changed files with 3 additions and 3 deletions
|
|
@ -388,7 +388,7 @@ public class DefaultLivePlaybackSpeedControlTest {
|
|||
|
||||
for (int i = 0; i < 500; i++) {
|
||||
ShadowSystemClock.advanceBy(Duration.ofMillis(100));
|
||||
long noiseUs = ((i % 10) - 5) * 1_000;
|
||||
long noiseUs = ((i % 10) - 5L) * 1_000;
|
||||
defaultLivePlaybackSpeedControl.getAdjustedPlaybackSpeed(
|
||||
/* liveOffsetUs= */ 45_000_000, /* bufferedDurationUs= */ 1_000_000 + noiseUs);
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@ public class DefaultLivePlaybackSpeedControlTest {
|
|||
// Pretend to have a buffered duration at around the target duration with some artificial noise.
|
||||
for (int i = 0; i < 500; i++) {
|
||||
ShadowSystemClock.advanceBy(Duration.ofMillis(100));
|
||||
long noiseUs = ((i % 10) - 5) * 1_000;
|
||||
long noiseUs = ((i % 10) - 5L) * 1_000;
|
||||
defaultLivePlaybackSpeedControl.getAdjustedPlaybackSpeed(
|
||||
/* liveOffsetUs= */ 49_000_000, /* bufferedDurationUs= */ 7_000_000 + noiseUs);
|
||||
}
|
||||
|
|
@ -451,7 +451,7 @@ public class DefaultLivePlaybackSpeedControlTest {
|
|||
// Pretend to have a buffered duration at around the target duration with some artificial noise.
|
||||
for (int i = 0; i < 500; i++) {
|
||||
ShadowSystemClock.advanceBy(Duration.ofMillis(100));
|
||||
long noiseUs = ((i % 10) - 5) * 1_000;
|
||||
long noiseUs = ((i % 10) - 5L) * 1_000;
|
||||
defaultLivePlaybackSpeedControl.getAdjustedPlaybackSpeed(
|
||||
/* liveOffsetUs= */ 49_000_000, /* bufferedDurationUs= */ 7_000_000 + noiseUs);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue