mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix issue with seeking before timeline available
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140204054
This commit is contained in:
parent
76c58a34d3
commit
ee9b7be2fa
1 changed files with 3 additions and 3 deletions
|
|
@ -981,9 +981,9 @@ import java.io.IOException;
|
||||||
*/
|
*/
|
||||||
private Pair<Integer, Long> resolveSeekPosition(SeekPosition seekPosition) {
|
private Pair<Integer, Long> resolveSeekPosition(SeekPosition seekPosition) {
|
||||||
Timeline seekTimeline = seekPosition.timeline;
|
Timeline seekTimeline = seekPosition.timeline;
|
||||||
if (seekTimeline == null) {
|
if (seekTimeline.isEmpty()) {
|
||||||
// The application performed a blind seek without a timeline (most likely based on knowledge
|
// The application performed a blind seek without a non-empty timeline (most likely based on
|
||||||
// of what the timeline will be). Use the internal timeline.
|
// knowledge of what the future timeline will be). Use the internal timeline.
|
||||||
seekTimeline = timeline;
|
seekTimeline = timeline;
|
||||||
Assertions.checkIndex(seekPosition.windowIndex, 0, timeline.getWindowCount());
|
Assertions.checkIndex(seekPosition.windowIndex, 0, timeline.getWindowCount());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue