Skip to content

Commit

Permalink
Try fix holes in rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAMan committed Mar 24, 2020
1 parent 971a997 commit a166606
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/SubtitleOctopus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,13 @@ class SubtitleOctopus {

for (int i = 0; i < track->n_events; i++, cur++) {
long long start = cur->Start;
if (start >= now && (start < closest || closest == -1)) {
if (start < now) {
if (start + cur->Duration >= now) {
// there's currently an event being displayed, we should render it
closest = now;
break;
}
} else if (start < closest || closest == -1) {
closest = start;
}
}
Expand Down

0 comments on commit a166606

Please sign in to comment.