Commit ee9b7be2 by olly Committed by Oliver Woodman

Fix issue with seeking before timeline available

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140204054
parent 76c58a34
......@@ -981,9 +981,9 @@ import java.io.IOException;
*/
private Pair<Integer, Long> resolveSeekPosition(SeekPosition seekPosition) {
Timeline seekTimeline = seekPosition.timeline;
if (seekTimeline == null) {
// The application performed a blind seek without a timeline (most likely based on knowledge
// of what the timeline will be). Use the internal timeline.
if (seekTimeline.isEmpty()) {
// The application performed a blind seek without a non-empty timeline (most likely based on
// knowledge of what the future timeline will be). Use the internal timeline.
seekTimeline = timeline;
Assertions.checkIndex(seekPosition.windowIndex, 0, timeline.getWindowCount());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment