mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Try not adapting before failing with BehindLiveWindowException in Hls
Issue:#1782 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136025847
This commit is contained in:
parent
64262085a7
commit
ff712aead5
1 changed files with 10 additions and 2 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue