mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
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
This commit is contained in:
parent
b7299a1164
commit
3543116da4
2 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||||
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;
|
||||||
|
|
||||||
@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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue