diff --git a/lib/dash/segment_template.js b/lib/dash/segment_template.js index 059e06b5ef..d1bac66f08 100644 --- a/lib/dash/segment_template.js +++ b/lib/dash/segment_template.js @@ -813,18 +813,16 @@ shaka.dash.TimelineSegmentIndex = class extends shaka.media.SegmentIndex { let ref = this.references[correctedPosition]; if (!ref) { + const mediaTemplate = this.templateInfo_.mediaTemplate; const range = this.templateInfo_.timeline[correctedPosition]; const segmentReplacement = position + this.templateInfo_.startNumber; const timeReplacement = this.templateInfo_ .unscaledPresentationTimeOffset + range.unscaledStart; const createUrisCb = () => { - if (!this.templateInfo_) { - return []; - } return shaka.dash.TimelineSegmentIndex .createUris_( - this.templateInfo_.mediaTemplate, + mediaTemplate, this.representationId_, segmentReplacement, this.bandwidth_,