From 7a34869f9ad27dc8f7e2ddcf62f882bae8e5ffb4 Mon Sep 17 00:00:00 2001 From: olly Date: Thu, 16 Aug 2018 09:07:53 -0700 Subject: [PATCH] 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 --- .../android/exoplayer2/source/ExtractorMediaPeriod.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java index 959a00e995..d26695afa7 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java @@ -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.