Skip to content

Commit

Permalink
fix(DASH): Allow play when SegmentTimeline has a duration 0 "S" eleme…
Browse files Browse the repository at this point in the history
…nt (#6896)

Fixes #6889
  • Loading branch information
avelad authored Jun 25, 2024
1 parent 9329b85 commit 3e45e66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/dash/mpd_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ shaka.dash.MpdUtils = class {

if (!d) {
shaka.log.warning(
'"S" element must have a duration:',
'ignoring the remaining "S" elements.', timePoint);
return timeline;
'"S" element must have a duration: ignoring this element.',
timePoint);
continue;
}

let startTime = t != null ? t : lastEndTime;
Expand Down
6 changes: 4 additions & 2 deletions test/dash/mpd_utils_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ describe('MpdUtils', () => {
checkTimePoints(timePoints, result, 1, 0, 20);
});

it('ignores elements after null duration', () => {
it('ignores elements with null duration', () => {
const timePoints = [
createTimePoint(0, 10, 0),
createTimePoint(10, 10, 0),
Expand All @@ -383,7 +383,9 @@ describe('MpdUtils', () => {
];
const result = [
{start: 0, end: 10},
{start: 10, end: 20},
{start: 10, end: 30},
{start: 30, end: 40},
{start: 40, end: 50},
];
checkTimePoints(timePoints, result, 1, 0, Infinity);
});
Expand Down

0 comments on commit 3e45e66

Please sign in to comment.