mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove unnecessary empty check in getCues(..)
This commit is contained in:
parent
7a6de79f91
commit
925a7fd045
1 changed files with 2 additions and 2 deletions
|
|
@ -61,8 +61,8 @@ import java.util.List;
|
||||||
@Override
|
@Override
|
||||||
public List<Cue> getCues(long timeUs) {
|
public List<Cue> getCues(long timeUs) {
|
||||||
int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false);
|
int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false);
|
||||||
if (index == -1 || cues.get(index).isEmpty()) {
|
if (index == -1) {
|
||||||
// timeUs is earlier than the start of the first cue, or we have an empty cue.
|
// timeUs is earlier than the start of the first cue.
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
} else {
|
} else {
|
||||||
return cues.get(index);
|
return cues.get(index);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue