From 66ca43ed1dca3011ce6efdf00703f14f8360948b Mon Sep 17 00:00:00 2001 From: tonihei Date: Mon, 14 Jan 2019 14:02:46 +0000 Subject: [PATCH] Don't forget isSeekable in ExtractorMediaSource. We currently forget whether a source is seekable at re-preparation. This was implemented intentionally this way under the assumption that we really can't seek until we have loaded the seek map again. However, seek operations are only allowed after a media period is prepared. So there is no harm in remembering whether a source is seekable. This problem currently prevents reusing ClippingMediaSources with ExtractorMediaSource and a non-zero start clip position. Issue: #5351 PiperOrigin-RevId: 229169441 --- RELEASENOTES.md | 3 +++ .../google/android/exoplayer2/source/ExtractorMediaSource.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 15e61d98ad..cfeb994247 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -9,6 +9,9 @@ * Fix issue where sending callbacks for playlist changes may cause problems because of parallel player access ([#5240](https://github.com/google/ExoPlayer/issues/5240)). +* Fix issue with reusing a `ClippingMediaSource` with an inner + `ExtractorMediaSource` and a non-zero start position + ([#5351](https://github.com/google/ExoPlayer/issues/5351)). ### 2.9.3 ### diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaSource.java index 085b5dba71..07733436cb 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaSource.java @@ -370,7 +370,7 @@ public final class ExtractorMediaSource extends BaseMediaSource boolean isTopLevelSource, @Nullable TransferListener mediaTransferListener) { transferListener = mediaTransferListener; - notifySourceInfoRefreshed(timelineDurationUs, /* isSeekable= */ false); + notifySourceInfoRefreshed(timelineDurationUs, timelineIsSeekable); } @Override