mirror of
https://github.com/androidx/media.git
synced 2025-05-04 22:20:47 +08:00
Fix HlsSampleStream#read non-fatal lack of mapping
HlsSampleStream#read should return end of stream when there is no mapping for the sample stream, instead of nothing read. This allows the player to transition to ended. Issue:#5524 PiperOrigin-RevId: 234764027
This commit is contained in:
parent
2685b8bd90
commit
16f41dbaab
@ -76,6 +76,8 @@
|
|||||||
* DASH: Fix issue handling large `EventStream` presentation timestamps
|
* DASH: Fix issue handling large `EventStream` presentation timestamps
|
||||||
([#5490](https://github.com/google/ExoPlayer/issues/5490)).
|
([#5490](https://github.com/google/ExoPlayer/issues/5490)).
|
||||||
* HLS:
|
* 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.
|
* Prevent unnecessary reloads of initialization segments.
|
||||||
* Support encrypted initialization segments
|
* Support encrypted initialization segments
|
||||||
([#5441](https://github.com/google/ExoPlayer/issues/5441)).
|
([#5441](https://github.com/google/ExoPlayer/issues/5441)).
|
||||||
|
@ -68,6 +68,10 @@ import java.io.IOException;
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer, boolean requireFormat) {
|
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()
|
return hasValidSampleQueueIndex()
|
||||||
? sampleStreamWrapper.readData(sampleQueueIndex, formatHolder, buffer, requireFormat)
|
? sampleStreamWrapper.readData(sampleQueueIndex, formatHolder, buffer, requireFormat)
|
||||||
: C.RESULT_NOTHING_READ;
|
: C.RESULT_NOTHING_READ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user