From f9121b520e9178e195f342070c863741d1962c3e Mon Sep 17 00:00:00 2001 From: Casey Occhialini <1508707+littlespex@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:17:34 -0800 Subject: [PATCH] fix: Fix bufferBehind setting broken by image segments (#4718) Resolves #4717 --- lib/dash/segment_template.js | 2 +- test/dash/dash_parser_manifest_unit.js | 1 + 2 files changed, 2 insertions(+), 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( diff --git a/test/dash/dash_parser_manifest_unit.js b/test/dash/dash_parser_manifest_unit.js index 1232d992e3..715f546416 100644 --- a/test/dash/dash_parser_manifest_unit.js +++ b/test/dash/dash_parser_manifest_unit.js @@ -2105,6 +2105,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);