Skip to content

Commit 396bdf6

Browse files
authored
perf(DASH): Release period combiner after parsing a VOD (#8443)
1 parent 3dbf4c4 commit 396bdf6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/dash/dash_parser.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,11 @@ shaka.dash.DashParser = class {
852852
// time, and we need to tell PresentationTimeline that so that it can
853853
// maintain consistency from here on.
854854
presentationTimeline.lockStartTime();
855+
856+
if (this.periodCombiner_ &&
857+
!this.manifest_.presentationTimeline.isLive()) {
858+
this.periodCombiner_.release();
859+
}
855860
} else {
856861
this.manifest_.periodCount = periods.length;
857862
this.manifest_.gapCount = this.gapCount_;

test/dash/dash_parser_manifest_unit.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2380,7 +2380,6 @@ describe('DashParser Manifest', () => {
23802380
// (DASH-IF IOP v4.3 6.2.5.1.)
23812381
const scheme = cicpScheme('TransferCharacteristics');
23822382
const sdrValues = [1, 6, 13, 14, 15];
2383-
const manifestPromises = [];
23842383
for (const value of sdrValues) {
23852384
const manifestText = [
23862385
'<MPD minBufferTime="PT75S">',
@@ -2404,10 +2403,9 @@ describe('DashParser Manifest', () => {
24042403

24052404
fakeNetEngine.setResponseText('dummy://foo', manifestText);
24062405

2407-
manifestPromises.push(parser.start('dummy://foo', playerInterface));
2408-
}
2409-
const manifests = await Promise.all(manifestPromises);
2410-
for (const manifest of manifests) {
2406+
/** @type {shaka.extern.Manifest} */
2407+
// eslint-disable-next-line no-await-in-loop
2408+
const manifest = await parser.start('dummy://foo', playerInterface);
24112409
expect(manifest.variants.length).toBe(1);
24122410
const stream = manifest.variants[0].video;
24132411
expect(stream.hdr).toBe('SDR');

0 commit comments

Comments
 (0)