Skip to content

Commit

Permalink
fix: Use getSegmentAvailabilityStart instead of getSeekRangeStart to …
Browse files Browse the repository at this point in the history
…evict segments (#7867)
  • Loading branch information
avelad authored and joeyparrish committed Jan 10, 2025
1 parent 87c5314 commit f7a436c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/dash/dash_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,11 @@ shaka.dash.DashParser = class {
// that the complex logic of multi-Period eviction and period-flattening
// is correct. See also:
// https://github.com/shaka-project/shaka-player/issues/3169#issuecomment-823580634
const availabilityStart =
presentationTimeline.getSegmentAvailabilityStart();
for (const stream of Object.values(this.streamMap_)) {
if (stream.segmentIndex) {
stream.segmentIndex.evict(
presentationTimeline.getSegmentAvailabilityStart());
stream.segmentIndex.evict(availabilityStart);
}
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/media/streaming_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ shaka.media.StreamingEngine = class {
const segmentIndex = mediaState.stream.segmentIndex;
if (segmentIndex instanceof shaka.media.MetaSegmentIndex) {
segmentIndex.evict(
this.manifest_.presentationTimeline.getSeekRangeStart());
this.manifest_.presentationTimeline.getSegmentAvailabilityStart());
}

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

0 comments on commit f7a436c

Please sign in to comment.