From 7ada1a848f0ff604a91b6d6567fd844fe867f281 Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Thu, 31 Oct 2019 09:32:14 +0000 Subject: [PATCH] Fix detection of Dolby Atmos in HLS E-AC3 with JOC is signaled using the CHANNELS attribute for HLS: https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices/hls_authoring_specification_for_apple_devices_appendices PiperOrigin-RevId: 277680300 --- RELEASENOTES.md | 1 + .../source/hls/playlist/HlsPlaylistParser.java | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 0f0af429d2..685026cdb3 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -4,6 +4,7 @@ * Fix the start of audio getting truncated when transitioning to a new item in a playlist of opus streams. +* Fix detection of Dolby Atmos in HLS to match the HLS authoring specification. ### 2.10.6 (2019-10-17) ### 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 030520f8cb..7ccbaf5d59 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 @@ -445,7 +445,15 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser variableDefinitions) { - String channelsString = parseOptionalStringAttr(line, REGEX_CHANNELS, variableDefinitions); - return channelsString != null - ? Integer.parseInt(Util.splitAtFirst(channelsString, "/")[0]) - : Format.NO_VALUE; - } - @Nullable private static SchemeData parseDrmSchemeData( String line, String keyFormat, Map variableDefinitions)