Open stari4ek opened 4 years ago
Thanks for reporting! I can repro this. It needs some further investigation.
I have the same problem on Xiaomi Redmi 7 and Xiaomi Mi 9 SE trying to playback .mp4 file from phone file system with my own ExoView app:.
2020-06-09 19:53:13.238 858-23993/? E/SoftMP3: mp3 decoder returned error 1
2020-06-09 19:53:13.238 23307-23992/com.github.isabsent E/ACodec: [OMX.google.mp3.decoder] ERROR(0x80001001)
2020-06-09 19:53:13.238 23307-23992/com.github.isabsent E/ACodec: signalError(omxError 0x80001001, internalError -2147483648)
2020-06-09 19:53:13.238 23307-23992/com.github.isabsent E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
2020-06-09 19:53:13.246 23307-23979/com.github.isabsent E/ExoPlayerImplInternal: Renderer error: index=1, type=audio, format=Format(2, null, null, audio/mpeg, null, -1, und, [-1, -1, -1.0], [2, 48000]), rendererSupport=YES
com.google.android.exoplayer2.ExoPlaybackException: java.lang.IllegalStateException
at com.google.android.exoplayer2.BaseRenderer.createRendererException(BaseRenderer.java:359)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:735)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:201)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.IllegalStateException
at android.media.MediaCodec.native_queueInputBuffer(Native Method)
at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2359)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1195)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:722)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:201)
at android.os.HandlerThread.run(HandlerThread.java:65)
2020-06-09 19:53:13.247 573-650/? W/SurfaceFlinger: Attempting to set client state on removed layer: android/com.android.internal.app.ResolverActivity#0
2020-06-09 19:53:13.247 573-650/? W/SurfaceFlinger: Attempting to destroy on removed layer: android/com.android.internal.app.ResolverActivity#0
2020-06-09 19:53:13.250 23323-23323/? D/EventBus: [23323, u0] send(AppTransitionFinishedEvent)
2020-06-09 19:53:13.250 23323-23323/? D/EventBus: [23323, u0] -> ForcedResizableInfoActivityController [0x64d6c07, P1] onBusEvent(AppTransitionFinishedEvent)
2020-06-09 19:53:13.250 23323-23323/? D/EventBus: [23323, u0] onBusEvent(AppTransitionFinishedEvent) duration: 28 microseconds, avg: 1760
2020-06-09 19:53:13.257 23307-23983/com.github.isabsent W/MapperHal: buffer descriptor with invalid usage bits 0x2000
2020-06-09 19:53:13.258 23307-23983/com.github.isabsent W/MapperHal: buffer descriptor with invalid usage bits 0x2000
2020-06-09 19:53:13.260 858-23826/? E/OMXNodeInstance: getConfig(0xf1d9e884:qcom.decoder.mpeg4, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
2020-06-09 19:53:13.261 23307-23979/com.github.isabsent E/ExoPlayerImplInternal: Disable failed.
java.lang.IllegalStateException
at android.media.MediaCodec.native_flush(Native Method)
at android.media.MediaCodec.flush(MediaCodec.java:2131)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:777)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:636)
at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:717)
at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:168)
at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1136)
at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:891)
at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:850)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:382)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:201)
at android.os.HandlerThread.run(HandlerThread.java:65)
2020-06-09 19:53:13.263 573-2190/? W/SurfaceFlinger: Attempting to set client state on removed layer: Dim Layer for - Task=12656#0
2020-06-09 19:53:13.263 573-2190/? W/SurfaceFlinger: Attempting to destroy on removed layer: Dim Layer for - Task=12656#0
2020-06-09 19:53:13.275 23307-23983/com.github.isabsent D/SurfaceUtils: set up nativeWindow 0x7bfc00e010 for 176x144, color 0x7fa30c06, rotation 0, usage 0x20002900
2020-06-09 19:53:13.292 23307-23982/com.github.isabsent D/SurfaceUtils: disconnecting from surface 0x7bfc00e010, reason disconnectFromSurface
2020-06-09 19:53:13.294 858-1081/? I/OMX-VDEC-1080P: omx_vdec::component_deinit() complete
2020-06-09 19:53:13.297 858-1081/? I/OMX-VDEC-1080P: Exit OMX vdec Destructor: fd=8
2020-06-09 19:53:13.297 858-1081/? I/OMX-VDEC-1080P: Video slvp perflock released
2020-06-09 19:53:13.314 23307-23979/com.github.isabsent E/ExoPlayerImplInternal: Reset failed.
java.lang.IllegalStateException
at android.media.MediaCodec.native_stop(Native Method)
at android.media.MediaCodec.stop(MediaCodec.java:2084)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:671)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onReset(MediaCodecRenderer.java:643)
at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.onReset(MediaCodecAudioRenderer.java:727)
at com.google.android.exoplayer2.BaseRenderer.reset(BaseRenderer.java:175)
at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:900)
at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:850)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:382)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:201)
at android.os.HandlerThread.run(HandlerThread.java:65)
When I playback the same file from the same place with the same ExoView application on other device Alcatel 1S 5028Y (Android 10) there is no problem.
ExoPlayer version is 2.11.4. I can give you any additional info if you are interested.
Any updates?
I am also facing the same issue when trying to use MediaCodec to decode audio and stream it through the SynthesisCallback from android.
E/ACodec: [OMX.google.mp3.decoder] ERROR(0x80001001) signalError(omxError 0x80001001, internalError -2147483648) E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
The code I have currently implemented works the majority of the times, except for the first time I try to play audio after starting my app. After failing once or twice every time I press the "play" button audio streams smoothly. Can it be an initialization error? I also have noticed that this error happens in different stages of the decoding, which makes me wonder if I am failing to read the documentation
[REQUIRED] Issue description
I'm getting
IllegalStateException
whenOMX.google.aac.decoder
or ffmpeg decoder is initializing for specific MPEG-TS.Most probably track info is incorrectly parsed from MPEG-TS. Format looks incorrect (channels number?):
From MediaInfo:
Same stream and local file plays well in VLC and mplayer (using ffmpeg):
[REQUIRED] Reproduction steps
Play provided video in demo player
[REQUIRED] Link to test content
[REQUIRED] A full bug report captured from the device
This is not device-specific, but here it is:
[REQUIRED] Version of ExoPlayer being used
Init 7341500 [ExoPlayerLib/2.11.3] [once, MIBOX3, Xiaomi, 26]
[REQUIRED] Device(s) and version(s) of Android being used
Init 7341500 [ExoPlayerLib/2.11.3] [once, MIBOX3, Xiaomi, 26]