Skip to content

Commit

Permalink
Improve subtitle fragment finder for gaps in live playlists (fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Walch committed May 29, 2021
1 parent 702447e commit ec50dd2
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/controller/subtitle-stream-controller.ts
Expand Up @@ -288,16 +288,20 @@ export class SubtitleStreamController
fragPrevious.endProgramDateTime,
maxFragLookUpTolerance
);
if (!foundFrag) {
foundFrag = findFragmentByPTS(
fragPrevious,
fragments,
targetBufferTime,
maxFragLookUpTolerance
);
if (!foundFrag && fragPrevious.start < fragments[0].start) {
foundFrag = fragments[0];
}
}
if (!foundFrag) {
foundFrag = findFragmentByPTS(
fragPrevious,
fragments,
targetBufferTime,
maxFragLookUpTolerance
);
if (
!foundFrag &&
fragPrevious &&
fragPrevious.start < fragments[0].start
) {
foundFrag = fragments[0];
}
}
} else {
Expand Down

0 comments on commit ec50dd2

Please sign in to comment.