diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 26db5c1c8b3..69e8bc249e8 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -76,6 +76,8 @@ * DASH: Fix issue handling large `EventStream` presentation timestamps ([#5490](https://github.com/google/ExoPlayer/issues/5490)). * HLS: + * Fix transition to STATE_ENDED when playing fragmented mp4 in chunkless + preparation ([#5524](https://github.com/google/ExoPlayer/issues/5524)). * Prevent unnecessary reloads of initialization segments. * Support encrypted initialization segments ([#5441](https://github.com/google/ExoPlayer/issues/5441)). diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStream.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStream.java index f43d119018b..cf879e91c6a 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStream.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStream.java @@ -68,6 +68,10 @@ public void maybeThrowError() throws IOException { @Override public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer, boolean requireFormat) { + if (sampleQueueIndex == HlsSampleStreamWrapper.SAMPLE_QUEUE_INDEX_NO_MAPPING_NON_FATAL) { + buffer.addFlag(C.BUFFER_FLAG_END_OF_STREAM); + return C.RESULT_BUFFER_READ; + } return hasValidSampleQueueIndex() ? sampleStreamWrapper.readData(sampleQueueIndex, formatHolder, buffer, requireFormat) : C.RESULT_NOTHING_READ;