Skip to content

AudioTrack buffer size retry size can still be too large on some devices #3207

Description

@Tolriq

Version

Media3 main branch

More version details

No response

Devices that reproduce the issue

Mi A Pro

Devices that do not reproduce the issue

Most of them

Reproducible in the demo app?

No

Reproduction steps

Play some media on the device

Expected result

The media plays

Actual result

The media does not play audio track can't be created.

2026-05-06 18:54:51.902 Error ExoPlayer  DecoderAudioRenderer - Audio sink error
h40: AudioTrack init failed 0 Config(44100, 12, 2, 815616) Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0, null], [2, 44100])
2026-05-06 18:54:52.268 Error ExoPlayer/8  playerFailed [eventTime=1155.24, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_AUDIO_TRACK_INIT_FAILED
  ey2: MediaCodecAudioRenderer error, index=0, format=Format(null, null, audio/flac, audio/flac, null, -1, null, 

For once the user provider the bugreport, but the issue is that the retry stops at 100000 but it ends up to be actually 1048800 when the TV only have 1MB. (So a little over 1048576 but enough to fail)

Media

N/A

Bug Report

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions