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:
olly 2018-08-16 09:07:53 -07:00 committed by Oliver Woodman
parent 32bd69d4b2
commit 7a34869f9a

View file

@ -370,8 +370,10 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
positionUs = seekMap.isSeekable() ? positionUs : 0;
lastSeekPositionUs = positionUs;
notifyDiscontinuity = false;
// If we're not pending a reset, see if we can seek within the buffer.
if (!isPendingReset() && seekInsideBufferUs(trackIsAudioVideoFlags, positionUs)) {
// If we're not playing a live stream or pending a reset, see if we can seek within the buffer.
if (dataType != C.DATA_TYPE_MEDIA_PROGRESSIVE_LIVE
&& !isPendingReset()
&& seekInsideBufferUs(trackIsAudioVideoFlags, positionUs)) {
return positionUs;
}
// We were unable to seek within the buffer, so need to reset.