Skip to content

Commit

Permalink
perf(DASH): Create segment indexes only on new periods (#7294)
Browse files Browse the repository at this point in the history
Old references to segment index are already stored in meta segment
index, so there's no reason to recreate them.
  • Loading branch information
tykus160 authored and joeyparrish committed Sep 13, 2024
1 parent 84c5621 commit 4209986
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util/periods.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ shaka.util.PeriodCombiner = class {
const streams = outputStream.matchedStreams;
goog.asserts.assert(streams, 'matched streams should be valid');

for (const stream of streams) {
for (let i = firstNewPeriodIndex; i < streams.length; i++) {
const stream = streams[i];
operations.push(stream.createSegmentIndex());
if (stream.trickModeVideo && !stream.trickModeVideo.segmentIndex) {
operations.push(stream.trickModeVideo.createSegmentIndex());
Expand Down

0 comments on commit 4209986

Please sign in to comment.