Schedule load for non-primary playlist for low latency streams
Low latency streams potentially need to remove preload chunks in case they are removed from the playlist. Hence we need to schedule loading the next playlist even if the playlist is not a primary playlist. Issue: #5011 PiperOrigin-RevId: 344995891
This commit is contained in:
parent
c7e1d3f222
commit
1a5d79b78a
@ -716,10 +716,13 @@ public final class DefaultHlsPlaylistTracker
|
||||
: (playlistSnapshot.targetDurationUs / 2);
|
||||
}
|
||||
earliestNextLoadTimeMs = currentTimeMs + C.usToMs(durationUntilNextLoadUs);
|
||||
// Schedule a load if this is the primary playlist and it doesn't have an end tag. Else the
|
||||
// next load will be scheduled when refreshPlaylist is called, or when this playlist becomes
|
||||
// the primary.
|
||||
if (playlistUrl.equals(primaryMediaPlaylistUrl) && !playlistSnapshot.hasEndTag) {
|
||||
// Schedule a load if this is the primary playlist or a playlist of a low-latency stream and
|
||||
// it doesn't have an end tag. Else the next load will be scheduled when refreshPlaylist is
|
||||
// called, or when this playlist becomes the primary.
|
||||
boolean scheduleLoad =
|
||||
playlistSnapshot.partTargetDurationUs != C.TIME_UNSET
|
||||
|| playlistUrl.equals(primaryMediaPlaylistUrl);
|
||||
if (scheduleLoad && !playlistSnapshot.hasEndTag) {
|
||||
loadPlaylistInternal(getMediaPlaylistUriForReload());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user