From 1f11233ba022e00367ed32904092070d8c42f5ee Mon Sep 17 00:00:00 2001 From: Steve Mayhew Date: Tue, 17 Mar 2020 13:56:00 -0700 Subject: [PATCH] Support implicit i-Frame initialization segment. In the HLS Spec (https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-04#section-4.4.3.6), specifically this or condition of this statement: "... defined by the EXT-X-MAP tag, or is located between the start of the resource and the offset of the first I-frame segment in that resource." Change adds code to add this "implicit" Media Initialization Segment if no EXT-X-MAP defines one explicitly. --- .../hls/playlist/HlsPlaylistParser.java | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java index e41d8b813b..d052160871 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java @@ -70,6 +70,7 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser variableDefinitions = new HashMap<>(); List segments = new ArrayList<>(); List tags = new ArrayList<>(); @@ -574,6 +575,9 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser