Skip to content

Commit

Permalink
Do not use shorter track duration when updating fragment timing at a …
Browse files Browse the repository at this point in the history
…discontinuity
  • Loading branch information
Rob Walch committed Jul 30, 2020
1 parent 20cd617 commit 484cac9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controller/level-helper.js
Expand Up @@ -46,7 +46,8 @@ export function updatePTS (fragments, fromIdx, toIdx) {
} else {
// we dont know startPTS[toIdx]
if (toIdx > fromIdx) {
fragTo.start = fragFrom.start + (fragFrom.minEndPTS ? fragFrom.minEndPTS - fragFrom.start : fragFrom.duration);
const contiguous = fragFrom.cc === fragTo.cc;
fragTo.start = fragFrom.start + ((contiguous && fragFrom.minEndPTS) ? fragFrom.minEndPTS - fragFrom.start : fragFrom.duration);
} else {
fragTo.start = Math.max(fragFrom.start - fragTo.duration, 0);
}
Expand Down

0 comments on commit 484cac9

Please sign in to comment.