parsePatchSegment_(contextId) {
    /** @type {shaka.dash.DashParser.Context} */
    const context = this.contextCache_.get(contextId);

    const currentStream = this.streamMap_.get(contextId);
    goog.asserts.assert(currentStream, 'stream should exist');

    if (currentStream.segmentIndex) {
      currentStream.segmentIndex.evict(
          this.manifest_.presentationTimeline.getSegmentAvailabilityStart());
    }

    try {
      const requestSegment = (uris, startByte, endByte, isInit) => {
        return this.requestSegment_(uris, startByte, endByte, isInit);
      };
      // TODO we should obtain lastSegmentNumber if possible
      const streamInfo = shaka.dash.SegmentTemplate.createStreamInfo(
          context, requestSegment, this.streamMap_, /* isUpdate= */ true,
          this.config_.dash.initialSegmentLimit, this.periodDurations_,
          context.representation.aesKey, /* lastSegmentNumber= */ null,
          /* isPatchUpdate= */ true, this.continuityCache_);
      currentStream.createSegmentIndex = async () => {
        if (!currentStream.segmentIndex) {
          currentStream.segmentIndex =
                await streamInfo.generateSegmentIndex();
        }
      };
    } catch (error) {
      const ContentType = shaka.util.ManifestParserUtils.ContentType;
      const contentType = context.representation.contentType;
      const isText = contentType == ContentType.TEXT ||
            contentType == ContentType.APPLICATION;
      const isImage = contentType == ContentType.IMAGE;
      if (!(isText || isImage) ||
            error.code != shaka.util.Error.Code.DASH_NO_SEGMENT_INFO) {
        // We will ignore any DASH_NO_SEGMENT_INFO errors for text/image
        throw error;
      }
    }
  }
Parses modified segments.

@param {string} contextId
@private