diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaPeriod.java b/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaPeriod.java index 7c60a379c7f..40bbb786f69 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaPeriod.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaPeriod.java @@ -178,10 +178,6 @@ public long selectTracks( @NullableType SampleStream[] streams, boolean[] streamResetFlags, long positionUs) { - if (preparePositionOverrideUs != C.TIME_UNSET && positionUs == preparePositionUs) { - positionUs = preparePositionOverrideUs; - preparePositionOverrideUs = C.TIME_UNSET; - } return castNonNull(mediaPeriod) .selectTracks(selections, mayRetainStreamFlags, streams, streamResetFlags, positionUs); } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaSource.java index c1744ed57a6..d787af15438 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaSource.java @@ -140,11 +140,6 @@ protected void onChildSourceInfoRefreshed( @Nullable MediaPeriodId idForMaskingPeriodPreparation = null; if (isPrepared) { timeline = timeline.cloneWithUpdatedTimeline(newTimeline); - if (unpreparedMaskingMediaPeriod != null) { - // Reset override in case the duration changed and we need to update our override. - setPreparePositionOverrideToUnpreparedMaskingPeriod( - unpreparedMaskingMediaPeriod.getPreparePositionOverrideUs()); - } } else if (newTimeline.isEmpty()) { timeline = hasRealTimeline