mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Small fix in IndexSeekMap
This change was meant to be in 2e5f2f12ad but
was not added my mistake.
PiperOrigin-RevId: 337041686
This commit is contained in:
parent
bb7c934812
commit
6f66e7d0ba
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ public final class IndexSeekMap implements SeekMap {
|
||||||
int targetIndex =
|
int targetIndex =
|
||||||
Util.binarySearchFloor(timesUs, timeUs, /* inclusive= */ true, /* stayInBounds= */ true);
|
Util.binarySearchFloor(timesUs, timeUs, /* inclusive= */ true, /* stayInBounds= */ true);
|
||||||
SeekPoint leftSeekPoint = new SeekPoint(timesUs[targetIndex], positions[targetIndex]);
|
SeekPoint leftSeekPoint = new SeekPoint(timesUs[targetIndex], positions[targetIndex]);
|
||||||
if (leftSeekPoint.timeUs >= timeUs || targetIndex == timesUs.length - 1) {
|
if (leftSeekPoint.timeUs == timeUs || targetIndex == timesUs.length - 1) {
|
||||||
return new SeekMap.SeekPoints(leftSeekPoint);
|
return new SeekMap.SeekPoints(leftSeekPoint);
|
||||||
} else {
|
} else {
|
||||||
SeekPoint rightSeekPoint =
|
SeekPoint rightSeekPoint =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue