diff --git a/lib/dash/mpd_utils.js b/lib/dash/mpd_utils.js index 605f5029dd..a0755aa353 100644 --- a/lib/dash/mpd_utils.js +++ b/lib/dash/mpd_utils.js @@ -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; diff --git a/test/dash/mpd_utils_unit.js b/test/dash/mpd_utils_unit.js index c63d16a0eb..01640a26ed 100644 --- a/test/dash/mpd_utils_unit.js +++ b/test/dash/mpd_utils_unit.js @@ -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), @@ -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); });