From d4ca1d942efa419344a6be7f9fda5ee0eabe63ee Mon Sep 17 00:00:00 2001 From: Casey Occhialini <1508707+littlespex@users.noreply.github.com> Date: Wed, 16 Nov 2022 12:27:09 -0800 Subject: [PATCH 1/2] Ignore image segment templates when updating maxSegementDuration --- lib/dash/segment_template.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dash/segment_template.js b/lib/dash/segment_template.js index 40e8f16ee9..8709dda1c7 100644 --- a/lib/dash/segment_template.js +++ b/lib/dash/segment_template.js @@ -67,7 +67,7 @@ shaka.dash.SegmentTemplate = class { }, }; } else if (info.segmentDuration) { - if (!isUpdate) { + if (!isUpdate && context.adaptationSet.contentType !== 'image') { context.presentationTimeline.notifyMaxSegmentDuration( info.segmentDuration); context.presentationTimeline.notifyMinSegmentStartTime( From 618faa33ee04e3b12f0cf96dea2aedb48906d498 Mon Sep 17 00:00:00 2001 From: Casey Occhialini <1508707+littlespex@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:51:13 -0800 Subject: [PATCH 2/2] Add test to ensure maxSegementDuration isn't changed when image adaptation sets are present --- test/dash/dash_parser_manifest_unit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/dash/dash_parser_manifest_unit.js b/test/dash/dash_parser_manifest_unit.js index 416b7ce3d4..5a978a8bab 100644 --- a/test/dash/dash_parser_manifest_unit.js +++ b/test/dash/dash_parser_manifest_unit.js @@ -2198,6 +2198,7 @@ describe('DashParser Manifest', () => { /** @type {shaka.extern.Manifest} */ const manifest = await parser.start('dummy://foo', playerInterface); expect(manifest.imageStreams.length).toBe(1); + expect(manifest.presentationTimeline.getMaxSegmentDuration()).toBe(1); const imageStream = manifest.imageStreams[0]; expect(imageStream.width).toBe(1024); expect(imageStream.height).toBe(1152);