Audiotrack stale playback head on ac3/eac3 audio, after seeking. playback stopped.
@tianyif is already working on this.
Since Jun 15, 2026.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 1.10.1
More version details
No response
Devices that reproduce the issue
Device: Hisense SmartTV 4K FFM / 65U75LUA
Android: 12, API 31
Build: STT2.230310.002 / 00.00.00.132
Security patch: 2025-05-01
SoC/platform: MediaTek MT9689 / mt5896
ABI: armeabi-v7a, armeabi only; 32-bit zygote
Display: 3840x2160 panel, Android override 1920x1080
Audio output: HDMI ARC, 48 kHz primary mixer
Media3: 1.10.1
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Created basic Android TV application with Media 3 as player - with some logging from Media3. Play an mp4 with direct-play Dolby-style encoded audio, i think limited to AC3 and EAC3. seeking forward will likely not play, will be stuck at 'buffering', though it is not buffering. seeking generally can produce this error > 50% of the time.
Expected result
From logs:
- The new encoded AudioTrack may still briefly start with a stale playback head.
- But after play(), the playback head resets to 0.
- audioTrackPositionAdvancing fires.
- Playback continues normally.
Actual result
From the logs, the failed seek pattern looked like this:
- Media3 successfully seeks inside the existing source buffer.
- The old AC3/EAC3 AudioTrack is released/paused with a non-zero playback head.
- A new direct encoded AudioTrack is created, but it starts with that same stale non-zero playback head.
- play() is called, but the playback head does not reset.
- Playback then gets stuck with repeated writes returning 0, playState=2, and the playback head never advancing.
i've created a fix for my local test project, which works... though i'm not filing a PR as i doubt this is a proper fix. but it does stop the issue from happening:
https://github.com/soloish90/media/tree/ac3-eac3-audiotrack-stale-head-proof
Media
Not applicable. any media with ac3/eac3 encoded audio.
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.