Skip to content

Commit

Permalink
Do not prematurely evict segments from multi-period manifests
Browse files Browse the repository at this point in the history
presentationTimeline.getSegmentAvailabilityStart() yields a start time
relative to the AST, but all of the reference start/end times are relative
to their PTO. We need to normalize the start time to the period before
we evict any segments.
  • Loading branch information
baconz committed Aug 13, 2016
1 parent 2ee7eec commit 5cffee9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dash/segment_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ shaka.dash.SegmentTemplate.createStream = function(
context.periodInfo.duration, references);
if (segmentIndex) {
segmentIndex.merge(references);
segmentIndex.evict(
context.presentationTimeline.getSegmentAvailabilityStart());
var start = context.presentationTimeline.getSegmentAvailabilityStart();
segmentIndex.evict(start - context.periodInfo.start);
} else {
context.presentationTimeline.notifySegments(
context.periodInfo.start, references);
Expand Down

0 comments on commit 5cffee9

Please sign in to comment.