Skip to content

Commit

Permalink
fix(MSS): Don't allow prefetch segments with self-generated data (#7485)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Oct 24, 2024
1 parent 9af4397 commit 4bbb9f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/media/segment_prefetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ shaka.media.SegmentPrefetch = class {
shaka.media.SegmentReference.Status.MISSING) {
prefetchAllowed = false;
}
if (reference.getSegmentData()) {
prefetchAllowed = false;
}
if (prefetchAllowed && reference.initSegmentReference) {
this.prefetchInitSegment(reference.initSegmentReference);
}
Expand Down Expand Up @@ -139,6 +142,10 @@ shaka.media.SegmentPrefetch = class {
return;
}

if (initSegmentReference.getSegmentData()) {
return;
}

// init segments are ignored from the prefetch limit
const initSegments = Array.from(this.initSegmentPrefetchMap_.keys());
const someReference = initSegments.some((reference) => {
Expand Down

0 comments on commit 4bbb9f5

Please sign in to comment.