Commit 9ac7f64c by aquilescanta Committed by Oliver Woodman

Fix search to end of stream in HLS

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139905590
parent 77715fbf
...@@ -215,7 +215,7 @@ import java.util.Locale; ...@@ -215,7 +215,7 @@ import java.util.Locale;
int chunkMediaSequence; int chunkMediaSequence;
if (previous == null || switchingVariant) { if (previous == null || switchingVariant) {
long targetPositionUs = previous == null ? playbackPositionUs : previous.startTimeUs; 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. // If the playlist is too old to contain the chunk, we need to refresh it.
chunkMediaSequence = mediaPlaylist.mediaSequence + mediaPlaylist.segments.size(); chunkMediaSequence = mediaPlaylist.mediaSequence + mediaPlaylist.segments.size();
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment