Commit ff712aea by aquilescanta Committed by Oliver Woodman

Try not adapting before failing with BehindLiveWindowException in Hls

Issue:#1782

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136025847
parent 64262085
...@@ -257,8 +257,16 @@ import java.util.Locale; ...@@ -257,8 +257,16 @@ import java.util.Locale;
chunkMediaSequence = getLiveNextChunkSequenceNumber(previous.chunkIndex, oldVariantIndex, chunkMediaSequence = getLiveNextChunkSequenceNumber(previous.chunkIndex, oldVariantIndex,
newVariantIndex); newVariantIndex);
if (chunkMediaSequence < mediaPlaylist.mediaSequence) { if (chunkMediaSequence < mediaPlaylist.mediaSequence) {
fatalError = new BehindLiveWindowException(); // We try getting the next chunk without adapting in case that's the reason for falling
return; // behind the live window.
newVariantIndex = oldVariantIndex;
mediaPlaylist = variantPlaylists[newVariantIndex];
chunkMediaSequence = getLiveNextChunkSequenceNumber(previous.chunkIndex, oldVariantIndex,
newVariantIndex);
if (chunkMediaSequence < mediaPlaylist.mediaSequence) {
fatalError = new BehindLiveWindowException();
return;
}
} }
} }
} 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