Commit e07c3581 by Oliver Woodman

Don't move to next subtitle too soon.

Second time lucky. We should just move to the next subtitle
when it's started. Simples.
parent 530aa265
...@@ -207,8 +207,7 @@ public final class TextTrackRenderer extends SampleSourceTrackRenderer implement ...@@ -207,8 +207,7 @@ public final class TextTrackRenderer extends SampleSourceTrackRenderer implement
} }
} }
if (nextSubtitle != null && (subtitleNextEventTimeUs == Long.MAX_VALUE if (nextSubtitle != null && nextSubtitle.startTimeUs <= positionUs) {
|| nextSubtitle.startTimeUs <= positionUs)) {
// Advance to the next subtitle. Sync the next event index and trigger an update. // Advance to the next subtitle. Sync the next event index and trigger an update.
subtitle = nextSubtitle; subtitle = nextSubtitle;
nextSubtitle = null; nextSubtitle = null;
......
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