Commit 66ca43ed by tonihei Committed by Oliver Woodman

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
parent 34d0e0ce
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
* Fix issue where sending callbacks for playlist changes may cause problems * Fix issue where sending callbacks for playlist changes may cause problems
because of parallel player access because of parallel player access
([#5240](https://github.com/google/ExoPlayer/issues/5240)). ([#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 ### ### 2.9.3 ###
......
...@@ -370,7 +370,7 @@ public final class ExtractorMediaSource extends BaseMediaSource ...@@ -370,7 +370,7 @@ public final class ExtractorMediaSource extends BaseMediaSource
boolean isTopLevelSource, boolean isTopLevelSource,
@Nullable TransferListener mediaTransferListener) { @Nullable TransferListener mediaTransferListener) {
transferListener = mediaTransferListener; transferListener = mediaTransferListener;
notifySourceInfoRefreshed(timelineDurationUs, /* isSeekable= */ false); notifySourceInfoRefreshed(timelineDurationUs, timelineIsSeekable);
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment