Don't move to next subtitle too soon.

Second time lucky. We should just move to the next subtitle
when it's started. Simples.
This commit is contained in:
Oliver Woodman 2015-09-01 14:01:06 +01:00
parent 530aa265ff
commit e07c35815e

View file

@ -207,8 +207,7 @@ public final class TextTrackRenderer extends SampleSourceTrackRenderer implement
}
}
if (nextSubtitle != null && (subtitleNextEventTimeUs == Long.MAX_VALUE
|| nextSubtitle.startTimeUs <= positionUs)) {
if (nextSubtitle != null && nextSubtitle.startTimeUs <= positionUs) {
// Advance to the next subtitle. Sync the next event index and trigger an update.
subtitle = nextSubtitle;
nextSubtitle = null;