mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Fix CompositionPlayerTest.imagePreview_imagePlaysForSetDuration
PiperOrigin-RevId: 700931124
This commit is contained in:
parent
08619bf6fa
commit
dfe3c90f9a
1 changed files with 4 additions and 1 deletions
|
|
@ -245,6 +245,7 @@ public class CompositionPlayerTest {
|
|||
.setUri(JPG_SINGLE_PIXEL_ASSET.uri)
|
||||
.setImageDurationMs(1_000)
|
||||
.build())
|
||||
.setFrameRate(30)
|
||||
.build())
|
||||
.build())
|
||||
.build());
|
||||
|
|
@ -258,7 +259,9 @@ public class CompositionPlayerTest {
|
|||
listener.waitUntilPlayerEnded();
|
||||
long playbackRealTimeMs = SystemClock.DEFAULT.elapsedRealtime() - playbackStartTimeMs;
|
||||
|
||||
assertThat(playbackRealTimeMs).isAtLeast(1_000);
|
||||
// Video frames are not rendered exactly at the time corresponding to their presentation
|
||||
// timestamp, and the differences accumulate.
|
||||
assertThat(playbackRealTimeMs).isAtLeast(900);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in a new issue