Commit 3543116d by tonihei Committed by Oliver Woodman

Prevent seeking when ICY metadata is present.

Any seek map with non-zero offsets breaks playback with ICY metadata as
the metadata is no longer read from the correct position.

Issue:#5658
PiperOrigin-RevId: 239605839
parent b7299a11
...@@ -78,6 +78,8 @@ ...@@ -78,6 +78,8 @@
`ExtractorsFactory` instances must now be passed via the `ExtractorsFactory` instances must now be passed via the
`ProgressiveMediaSource.Factory` constructor, and `setExtractorsFactory` is `ProgressiveMediaSource.Factory` constructor, and `setExtractorsFactory` is
deprecated. deprecated.
* Prevent seeking when ICY metadata is present to prevent playback problems
([#5658](https://github.com/google/ExoPlayer/issues/5658)).
### 2.9.6 ### ### 2.9.6 ###
......
...@@ -31,6 +31,7 @@ import com.google.android.exoplayer2.extractor.ExtractorOutput; ...@@ -31,6 +31,7 @@ import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.extractor.PositionHolder; import com.google.android.exoplayer2.extractor.PositionHolder;
import com.google.android.exoplayer2.extractor.SeekMap; import com.google.android.exoplayer2.extractor.SeekMap;
import com.google.android.exoplayer2.extractor.SeekMap.SeekPoints; import com.google.android.exoplayer2.extractor.SeekMap.SeekPoints;
import com.google.android.exoplayer2.extractor.SeekMap.Unseekable;
import com.google.android.exoplayer2.extractor.TrackOutput; import com.google.android.exoplayer2.extractor.TrackOutput;
import com.google.android.exoplayer2.metadata.Metadata; import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.metadata.icy.IcyHeaders; import com.google.android.exoplayer2.metadata.icy.IcyHeaders;
...@@ -626,7 +627,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType; ...@@ -626,7 +627,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
@Override @Override
public void seekMap(SeekMap seekMap) { public void seekMap(SeekMap seekMap) {
this.seekMap = seekMap; this.seekMap = icyHeaders == null ? seekMap : new Unseekable(/* durationUs */ C.TIME_UNSET);
handler.post(maybeFinishPrepareRunnable); handler.post(maybeFinishPrepareRunnable);
} }
......
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