mirror of
https://github.com/androidx/media.git
synced 2025-05-07 07:30:22 +08:00
Fix search to end of stream in HLS
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139905590
This commit is contained in:
parent
77715fbfbe
commit
9ac7f64c84
@ -215,7 +215,7 @@ import java.util.Locale;
|
||||
int chunkMediaSequence;
|
||||
if (previous == null || switchingVariant) {
|
||||
long targetPositionUs = previous == null ? playbackPositionUs : previous.startTimeUs;
|
||||
if (targetPositionUs > mediaPlaylist.getEndTimeUs()) {
|
||||
if (!mediaPlaylist.hasEndTag && targetPositionUs > mediaPlaylist.getEndTimeUs()) {
|
||||
// If the playlist is too old to contain the chunk, we need to refresh it.
|
||||
chunkMediaSequence = mediaPlaylist.mediaSequence + mediaPlaylist.segments.size();
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user