androidx / androidx/media

Playback will not stop if multiple exceptions occur in the playingPeriodHolder.prepared state

Open
#2,847 6 comments 0 reactions 1 assignee View on GitHub

@tianyif is already working on this.

Since Oct 15, 2025.

question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

When I play an online MP4 video, I get an exception:

java.io.EOFException
at androidx.media3.exoplayer.source.SampleDataQueue.sampleData(SampleDataQueue.java:186)
at androidx.media3.exoplayer.source.SampleQueue.sampleData(SampleQueue.java:635)
at androidx.media3.extractor.TrackOutput.sampleData(TrackOutput.java:168)
at androidx.media3.extractor.mp4.Mp4Extractor.readSample(Mp4Extractor.java:961)
at androidx.media3.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:410)
at androidx.media3.exoplayer.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:147)
at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1146)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:453)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)

When I turn off autoplay in EXO, the above exception recurs, consuming my phone's network data. Is there a way to destroy EXO without playing the video or prevent network requests when an exception occurs?

This issue frequently occurs with the following online MP4 video links:
https://www.maersk.com.cn/~/media_sc9/maersk/homepage/videos/all-the-way_16x9_SUBS_ENG.mp4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.