Skip to content

Commit 00f4763

Browse files
aveladjoeyparrish
authored andcommitted
fix(MSS): Don't allow prefetch segments with self-generated data (#7485)
1 parent 0e1c42c commit 00f4763

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/media/segment_prefetch.js

+7
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ shaka.media.SegmentPrefetch = class {
111111
shaka.media.SegmentReference.Status.MISSING) {
112112
prefetchAllowed = false;
113113
}
114+
if (reference.getSegmentData()) {
115+
prefetchAllowed = false;
116+
}
114117
if (prefetchAllowed && reference.initSegmentReference) {
115118
this.prefetchInitSegment(reference.initSegmentReference);
116119
}
@@ -143,6 +146,10 @@ shaka.media.SegmentPrefetch = class {
143146
return;
144147
}
145148

149+
if (initSegmentReference.getSegmentData()) {
150+
return;
151+
}
152+
146153
// init segments are ignored from the prefetch limit
147154
const initSegments = Array.from(this.initSegmentPrefetchMap_.keys());
148155
const someReference = initSegments.some((reference) => {

0 commit comments

Comments
 (0)