mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix seeking in progressive live streams
Issue: https://github.com/google/ExoPlayer/issues/4493 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=208992790
This commit is contained in:
parent
32bd69d4b2
commit
7a34869f9a
1 changed files with 4 additions and 2 deletions
|
|
@ -370,8 +370,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
||||||
positionUs = seekMap.isSeekable() ? positionUs : 0;
|
positionUs = seekMap.isSeekable() ? positionUs : 0;
|
||||||
lastSeekPositionUs = positionUs;
|
lastSeekPositionUs = positionUs;
|
||||||
notifyDiscontinuity = false;
|
notifyDiscontinuity = false;
|
||||||
// If we're not pending a reset, see if we can seek within the buffer.
|
// If we're not playing a live stream or pending a reset, see if we can seek within the buffer.
|
||||||
if (!isPendingReset() && seekInsideBufferUs(trackIsAudioVideoFlags, positionUs)) {
|
if (dataType != C.DATA_TYPE_MEDIA_PROGRESSIVE_LIVE
|
||||||
|
&& !isPendingReset()
|
||||||
|
&& seekInsideBufferUs(trackIsAudioVideoFlags, positionUs)) {
|
||||||
return positionUs;
|
return positionUs;
|
||||||
}
|
}
|
||||||
// We were unable to seek within the buffer, so need to reset.
|
// We were unable to seek within the buffer, so need to reset.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue