diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ae2a28d49b..dcd46f2192 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -35,6 +35,10 @@ views to be used with other `Player` implementations, and removes the dependency from the UI module to the ExoPlayer module. This is a breaking change. +* HLS: + * Fallback to chunkful preparation if the playlist CODECS attribute + does not contain the audio codec + ([#10065](https://github.com/google/ExoPlayer/issues/10065)). * RTSP: * Add RTP reader for MPEG4 ([#35](https://github.com/androidx/media/pull/35)) diff --git a/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/HlsMediaPeriod.java b/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/HlsMediaPeriod.java index b5822578f8..101bb7a2ed 100644 --- a/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/HlsMediaPeriod.java +++ b/libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/HlsMediaPeriod.java @@ -646,7 +646,8 @@ private void buildAndPrepareMainSampleStreamWrapper( int numberOfVideoCodecs = Util.getCodecCountOfType(codecs, C.TRACK_TYPE_VIDEO); int numberOfAudioCodecs = Util.getCodecCountOfType(codecs, C.TRACK_TYPE_AUDIO); boolean codecsStringAllowsChunklessPreparation = - numberOfAudioCodecs <= 1 + (numberOfAudioCodecs == 1 + || (numberOfAudioCodecs == 0 && multivariantPlaylist.audios.isEmpty())) && numberOfVideoCodecs <= 1 && numberOfAudioCodecs + numberOfVideoCodecs > 0; @C.TrackType