Skip to content

Commit a166606

Browse files
committed
Try fix holes in rendering
1 parent 971a997 commit a166606

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/SubtitleOctopus.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,13 @@ class SubtitleOctopus {
480480

481481
for (int i = 0; i < track->n_events; i++, cur++) {
482482
long long start = cur->Start;
483-
if (start >= now && (start < closest || closest == -1)) {
483+
if (start < now) {
484+
if (start + cur->Duration >= now) {
485+
// there's currently an event being displayed, we should render it
486+
closest = now;
487+
break;
488+
}
489+
} else if (start < closest || closest == -1) {
484490
closest = start;
485491
}
486492
}

0 commit comments

Comments
 (0)