Skip to content

Commit 11afdc8

Browse files
authored
fix: Use getSegmentAvailabilityStart instead of getSeekRangeStart to evict segments (#7867)
1 parent 5e5e5a8 commit 11afdc8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/dash/dash_parser.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -688,10 +688,11 @@ shaka.dash.DashParser = class {
688688
// that the complex logic of multi-Period eviction and period-flattening
689689
// is correct. See also:
690690
// https://github.com/shaka-project/shaka-player/issues/3169#issuecomment-823580634
691+
const availabilityStart =
692+
presentationTimeline.getSegmentAvailabilityStart();
691693
for (const stream of Object.values(this.streamMap_)) {
692694
if (stream.segmentIndex) {
693-
stream.segmentIndex.evict(
694-
presentationTimeline.getSegmentAvailabilityStart());
695+
stream.segmentIndex.evict(availabilityStart);
695696
}
696697
}
697698
} else {

lib/media/streaming_engine.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2340,7 +2340,7 @@ shaka.media.StreamingEngine = class {
23402340
const segmentIndex = mediaState.stream.segmentIndex;
23412341
if (segmentIndex instanceof shaka.media.MetaSegmentIndex) {
23422342
segmentIndex.evict(
2343-
this.manifest_.presentationTimeline.getSeekRangeStart());
2343+
this.manifest_.presentationTimeline.getSegmentAvailabilityStart());
23442344
}
23452345

23462346
const logPrefix = shaka.media.StreamingEngine.logPrefix_(mediaState);

0 commit comments

Comments
 (0)