Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaCodecAudioRenderer error on certain files #604

Open
1 task
fegauthier opened this issue Aug 22, 2023 · 0 comments
Open
1 task

MediaCodecAudioRenderer error on certain files #604

fegauthier opened this issue Aug 22, 2023 · 0 comments
Assignees

Comments

@fegauthier
Copy link

fegauthier commented Aug 22, 2023

Version

Media3 1.1.1

More version details

No response

Devices that reproduce the issue

My testing device is an Android TV 11. 2GB of RAM

Devices that do not reproduce the issue

All devices that I tested does the same error.

Reproducible in the demo app?

Yes

Reproduction steps

  1. Play the following network file: https://t.ly/8y1HK
  2. You will see video for like a second and a MediaCodecAudioRenderer error will be thrown

Expected result

Expected this file to be played because it plays on VLC and FFMPEG (FFPLAY)

Actual result

Playback crash after 1 second

2023-08-22 10:49:43.245 19809-19993 MediaCodecAudioRenderer com.tv.player                        E  Audio codec error
                                                                                                      java.lang.IllegalStateException
                                                                                                          at android.media.MediaCodec.getBuffer(Native Method)
                                                                                                          at android.media.MediaCodec.getInputBuffer(MediaCodec.java:3910)
                                                                                                          at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.getInputBuffer(SynchronousMediaCodecAdapter.java:126)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1228)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:818)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1047)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:522)
                                                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                                          at android.os.Looper.loop(Looper.java:223)
                                                                                                          at android.os.HandlerThread.run(HandlerThread.java:67)
2023-08-22 10:49:43.255 19809-19993 ExoPlayerImplInternal   com.tv.player                        E  Playback error
                                                                                                      androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(2, Stereo, null, audio/mpeg, null, -1, und, [-1, -1, -1.0, null], [2, 44100]), format_supported=YES
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:601)
                                                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                                          at android.os.Looper.loop(Looper.java:223)
                                                                                                          at android.os.HandlerThread.run(HandlerThread.java:67)
                                                                                                      Caused by: androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException: Decoder failed: c2.android.mp3.decoder
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.createDecoderException(MediaCodecRenderer.java:970)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:837)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1047)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:522)
                                                                                                          at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                                          at android.os.Looper.loop(Looper.java:223) 
                                                                                                          at android.os.HandlerThread.run(HandlerThread.java:67) 
                                                                                                      Caused by: java.lang.IllegalStateException
                                                                                                          at android.media.MediaCodec.getBuffer(Native Method)
                                                                                                          at android.media.MediaCodec.getInputBuffer(MediaCodec.java:3910)
                                                                                                          at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.getInputBuffer(SynchronousMediaCodecAdapter.java:126)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1228)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:818)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1047) 
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:522) 
                                                                                                          at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                                          at android.os.Looper.loop(Looper.java:223) 
                                                                                                          at android.os.HandlerThread.run(HandlerThread.java:67) 
2023-08-22 10:49:43.299 19809-19993 ExoPlayerImplInternal   com.tv.player                        E  Disable failed.
                                                                                                      java.lang.IllegalStateException
                                                                                                          at android.media.MediaCodec.native_flush(Native Method)
                                                                                                          at android.media.MediaCodec.flush(MediaCodec.java:2298)
                                                                                                          at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.flush(SynchronousMediaCodecAdapter.java:168)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:901)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:894)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:733)
                                                                                                          at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:607)
                                                                                                          at androidx.media3.exoplayer.BaseRenderer.disable(BaseRenderer.java:197)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1731)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1453)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1413)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:634)
                                                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                                          at android.os.Looper.loop(Looper.java:223)
                                                                                                          at android.os.HandlerThread.run(HandlerThread.java:67)

Media

Link to use: https://t.ly/8y1HK

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants