ExoPlayer crash on dolby digital stream when connected to bluetooth audio device
Maintainers usually reply within 4 days
@tianyif is already working on this.
Since May 18, 2026.
Assessment
This issue has not been assessed yet.
Description
Version
Media3 1.9.0
More version details
No response
Devices that reproduce the issue
Google Tv Streamer
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
No
Reproduction steps
Get a Google Tv Streamer and connect to rainberry 5.1 sound system via bluetooth (This is the sound system I am using to test but I don't think it matters). Let the player play some dolby digital stream.
Expected result
Player not crashing
Actual result
Playback crashes:
14:56:40.526 E [MediaCodecAudioRenderer] Audio sink error
androidx.media3.exoplayer.audio.AudioSink$InitializationException: AudioTrack init failed 0 Config(48000, 252, 5, 28000) Format(Audio2_6, null, audio/mp4, audio/ac3, ac-3, 448000, dd, [-1, -1, -1.0, null], [6, 48000])
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioOutput(DefaultAudioSink.java:1067)
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioOutputWithRetry(DefaultAudioSink.java:1033)
at androidx.media3.exoplayer.audio.DefaultAudioSink.initializeAudioOutput(DefaultAudioSink.java:811)
at androidx.media3.exoplayer.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:914)
at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:859)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:2259)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:945)
at androidx.media3.exoplayer.RendererHolder.render(RendererHolder.java:392)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1378)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:707)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: androidx.media3.exoplayer.audio.AudioOutputProvider$InitializationException: java.lang.UnsupportedOperationException: Cannot create AudioTrack
at androidx.media3.exoplayer.audio.AudioTrackAudioOutputProvider.getAudioOutput(AudioTrackAudioOutputProvider.java:356)
at androidx.media3.exoplayer.audio.AudioTrackAudioOutputProvider.getAudioOutput(AudioTrackAudioOutputProvider.java:62)
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioOutput(DefaultAudioSink.java:1058)
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioOutputWithRetry(DefaultAudioSink.java:1033)
at androidx.media3.exoplayer.audio.DefaultAudioSink.initializeAudioOutput(DefaultAudioSink.java:811)
at androidx.media3.exoplayer.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:914)
at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:859)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:2259)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:945)
at androidx.media3.exoplayer.RendererHolder.render(RendererHolder.java:392)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1378)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:707)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
at android.media.AudioTrack$Builder.build(AudioTrack.java:1455)
at androidx.media3.exoplayer.audio.AudioTrackAudioOutputProvider.getAudioOutput(AudioTrackAudioOutputProvider.java:353)
at androidx.media3.exoplayer.audio.AudioTrackAudioOutputProvider.getAudioOutput(AudioTrackAudioOutputProvider.java:62)
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioOutput(DefaultAudioSink.java:1058)
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioOutputWithRetry(DefaultAudioSink.java:1033)
at androidx.media3.exoplayer.audio.DefaultAudioSink.initializeAudioOutput(DefaultAudioSink.java:811)
at androidx.media3.exoplayer.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:914)
at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:859)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:2259)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:945)
at androidx.media3.exoplayer.RendererHolder.render(RendererHolder.java:392)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1378)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:707)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
I noticed on the device, this function returns: [ENCODING_PCM_16BIT, ENCODING_PCM_16BIT, ENCODING_E_AC3, ENCODING_AC4, ENCODING_E_AC3_JOC], but later when the player tries to initialize an AudioTrack with ENCODING_E_AC3 then the above crash happen.
It may be an OS level bug, but should you move this bluetooth check before the getCapabilitiesInternalForDirectPlayback call?
Media
Any dolby digital stream. But I cannot provide one.
Bug Report
- You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 998
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from androidx/media
-
Waive ads when seek/start at the beginningPossibly taken @microkatz claimed this today. Openenhancement
androidx/media#3496 · 2 comments · 1 assignee ·
Maintainers usually reply within 4 days
-
Since 1.9.0, skip buttons in SLOT_BACK / SLOT_FORWARD reach legacy controllers as custom actionsPossibly taken @marcbaechinger claimed this today. Openbug
androidx/media#3495 · 1 comment · 1 assignee ·
Maintainers usually reply within 4 days
-
Allow configuring asset-list prefetch timing per HLS interstitialPossibly taken @marcbaechinger claimed this 1 day ago. Openenhancement needs triage
androidx/media#3494 · 1 assignee ·
Maintainers usually reply within 4 days
-
Offloaded audio left paused keeps AudioFlinger's AudioOffload wake lock forever, device never suspendsPossibly taken @microkatz claimed this 1 day ago. Open
androidx/media#3493 · 1 assignee ·
Maintainers usually reply within 4 days
-
Allow opting into frame-index seeking for MP3s without reliable seek metadataPossibly taken @icbaker claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
androidx/media#3492 · 1 assignee ·
Maintainers usually reply within 4 days
Similar issues
-
Component: Frontend Component: Web Component Type: Maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
it-at-m/refarch-templates#1944 ·
Maintainers usually reply within 2 days
-
priority: p2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
googleapis/java-genai#1372 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
-
GeoSeries scale and skew tests fail with pytest 9.2.0Possibly taken @jiayuasu claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
carlos-emr/carlos#5431 ·
Maintainers usually reply within 1 day