Skip to content

Commit

Permalink
Try to fix the playback issue for case x-discontinuity without init t…
Browse files Browse the repository at this point in the history
…ag (#22)
  • Loading branch information
guoen21 authored Apr 3, 2024
1 parent 28aafd2 commit a3e8890
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,8 @@ private static HlsMediaPlaylist parseMediaPlaylist(
if (METHOD_NONE.equals(method)) {
currentSchemeDatas.clear();
cachedDrmInitData = null;
// To fix the playback issue on the mixed-ts-cmaf stream.
initializationSegment = null;
} else /* !METHOD_NONE.equals(method) */ {
fullSegmentEncryptionIV = parseOptionalStringAttr(line, REGEX_IV, variableDefinitions);
if (KEYFORMAT_IDENTITY.equals(keyFormat)) {
Expand Down Expand Up @@ -853,8 +855,6 @@ private static HlsMediaPlaylist parseMediaPlaylist(
playlistDiscontinuitySequence = Integer.parseInt(line.substring(line.indexOf(':') + 1));
} else if (line.equals(TAG_DISCONTINUITY) && !discontinuityAfterSkip) {
relativeDiscontinuitySequence++;
// To fix the playback issue on the mixed-ts-cmaf stream.
initializationSegment = null;
} else if (line.startsWith(TAG_PROGRAM_DATE_TIME)) {
segmentStartTimeUtcUs = Util.msToUs(Util.parseXsDateTime(line.substring(line.indexOf(':') + 1)));
// Calc playlist start time with latest value of #EXT-X-PROGRAM-DATE-TIME tag, instead first value.
Expand Down

0 comments on commit a3e8890

Please sign in to comment.