Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
* Fix bug where track selection changes after loading low-latency parts
and preload hints can cause playback to get stuck or freeze
([#2299](https://github.com/androidx/media/issues/2299)).
* Prevent excessive reloads by waiting for half the target duration
when `CAN-BLOCK-RELOAD=YES` is not honored by the server
([#2317](https://github.com/androidx/media/pull/2317)).
* DASH extension:
* Fix issue where trick-play adaptation set is merged with its main
adaptation set to form an invalid `TrackGroup`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,14 @@ private void processLoadedPlaylist(
playlistSnapshot != oldPlaylist
? playlistSnapshot.targetDurationUs
: (playlistSnapshot.targetDurationUs / 2);
} else if (playlistSnapshot == oldPlaylist) {
// To prevent infinite requests when the server responds with CAN-BLOCK-RELOAD=YES but does
// not actually block until the playlist updates, wait for half the target duration before
// retrying.
durationUntilNextLoadUs =
playlistSnapshot.partTargetDurationUs != C.TIME_UNSET
? playlistSnapshot.partTargetDurationUs / 2
: playlistSnapshot.targetDurationUs / 2;
}
earliestNextLoadTimeMs =
currentTimeMs + Util.usToMs(durationUntilNextLoadUs) - loadEventInfo.loadDurationMs;
Expand Down