ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Getting CodecException intermittently

Open rajeshghosh1978 opened this issue 5 years ago • 26 comments

[REQUIRED] Content description

We are getting calls from our customer about playback issue with codec exception. Based on our log, we can see the same customer has been playing the same live (dash) channel every day. Whereas some time they are getting codec exception. Since they are playing a live content, there might be some codec issues while slicing the content but we are stuck when we got a report about VOD content as well. The same customer can play the VOD a few days back, but after 2 days they can't play the same content due to codec exception.

05-14 19:11:09.582 I/OMXClient(27327): Treble IOmx obtained
05-14 19:11:09.582 E/HwExtendedCodec(27327): mime: video/avc matching compontent failed!
05-14 19:11:09.587 I/ACodec  (27327): In onAllocateComponent create compenent, codec name: OMX.hisi.video.decoder.avc.secure
05-14 19:11:09.592 D/SurfaceUtils(27327): connecting to surface 0xbf63a008, reason connectToSurface
05-14 19:11:09.593 I/MediaCodec(27327): [OMX.hisi.video.decoder.avc.secure] setting surface generation to 27982849
05-14 19:11:09.593 D/SurfaceUtils(27327): disconnecting from surface 0xbf63a008, reason connectToSurface(reconnect)
05-14 19:11:09.593 D/SurfaceUtils(27327): connecting to surface 0xbf63a008, reason connectToSurface(reconnect)
05-14 19:11:09.594 E/ACodec  (27327): [OMX.hisi.video.decoder.avc.secure] setPortMode on output to DynamicANWBuffer failed w/ err -2147483648
05-14 19:11:09.595 I/HwExtendedCodec(27327): mime is [video/avc] at setVideoFormat
05-14 19:11:09.597 I/ACodec  (27327): codec does not support config priority (err -22)
05-14 19:11:09.605 I/ACodec  (27327): onStart
05-14 19:11:09.609 E/ACodec  (27327): Failed to allocate buffers after transitioning to IDLE state (error 0x80000000)
05-14 19:11:09.609 E/ACodec  (27327): signalError(omxError 0x80001001, internalError -2147483648)
05-14 19:11:09.610 E/MediaCodec(27327): Codec reported err 0x80001001, actionCode 0, while in state 5
05-14 19:11:09.610 E/ACodec  (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001009)
05-14 19:11:09.610 E/ACodec  (27327): signalError(omxError 0x80001009, internalError -2147483648)
05-14 19:11:09.610 E/ACodec  (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001009)
05-14 19:11:09.610 E/ACodec  (27327): signalError(omxError 0x80001009, internalError -2147483648)
05-14 19:11:09.610 E/ACodec  (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001012)
05-14 19:11:09.610 E/ACodec  (27327): signalError(omxError 0x80001012, internalError -2147483648)
05-14 19:11:09.610 E/ACodec  (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001012)
05-14 19:11:09.610 E/ACodec  (27327): signalError(omxError 0x80001012, internalError -2147483648)
05-14 19:11:09.616 D/SurfaceUtils(27327): disconnecting from surface 0xbf63a008, reason disconnectFromSurface
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001009, actionCode 0, while in state 0
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001009, actionCode 0, while in state 0
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001012, actionCode 0, while in state 0
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001012, actionCode 0, while in state 0
05-14 19:11:09.626 W/MediaCodecRenderer(27327): Failed to initialize decoder: OMX.hisi.video.decoder.avc.secure
05-14 19:11:09.626 W/MediaCodecRenderer(27327): android.media.MediaCodec$CodecException: start failed
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at android.media.MediaCodec.native_start(Native Method)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at android.media.MediaCodec.start(MediaCodec.java:2071)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:814)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at android.os.Handler.dispatchMessage(Handler.java:105)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at android.os.Looper.loop(Looper.java:166)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): 	at android.os.HandlerThread.run(HandlerThread.java:65)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): Playback error.
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.hisi.video.decoder.avc.secure, Format(C, null, null, video/avc, avc1.4d001e, 736395, null, [640, 360, 30.0], [-1, -1])
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:479)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at android.os.Handler.dispatchMessage(Handler.java:105)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at android.os.Looper.loop(Looper.java:166)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at android.os.HandlerThread.run(HandlerThread.java:65)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.hisi.video.decoder.avc.secure, Format(C, null, null, video/avc, avc1.4d001e, 736395, null, [640, 360, 30.0], [-1, -1])
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:753)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	... 9 more
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): Caused by: android.media.MediaCodec$CodecException: start failed
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at android.media.MediaCodec.native_start(Native Method)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at android.media.MediaCodec.start(MediaCodec.java:2071)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:814)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): 	... 10 more

[REQUIRED] Link to test content

I can't provide any link

[REQUIRED] Version of ExoPlayer being used

2.9.6

[REQUIRED] Device(s) and version(s) of Android being used

Any device (we are supporting from 5.0 and upword)

rajeshghosh1978 avatar May 23 '19 19:05 rajeshghosh1978

Another log from a different customer

05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): Internal runtime error.
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): android.media.MediaCodec$CodecException: Error 0x80000000
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at android.media.MediaCodec.native_queueSecureInputBuffer(Native Method)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at android.media.MediaCodec.queueSecureInputBuffer(MediaCodec.java:2540)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1016)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:664)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at android.os.Handler.dispatchMessage(Handler.java:101)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at android.os.Looper.loop(Looper.java:164)
05-22 17:14:34.011 E/ExoPlayerImplInternal(19755): 	at android.os.HandlerThread.run(HandlerThread.java:65)
05-22 17:14:34.012 I/MediaCodec(19755): (0xd35f5340) stop
05-22 17:14:34.059 D/SurfaceUtils(19755): disconnecting from surface 0xba862808, reason pushBlankBuffersToNativeWindow
05-22 17:14:34.061 D/SurfaceUtils(19755): set up nativeWindow 0xba862808 for 1x1, color 0x2, rotation 0, usage 0x130
05-22 17:14:34.073 D/SurfaceUtils(19755): connecting to surface 0xba862808, reason pushBlankBuffersToNativeWindow(err2)
05-22 17:14:34.073 D/SurfaceUtils(19755): disconnecting from surface 0xba862808, reason disconnectFromSurface
05-22 17:14:34.073 I/MediaCodec(19755): (0xd35f5340) release
05-22 17:14:34.094 I/MediaCodec(19755): (0xd35f6380) stop
05-22 17:14:34.107 I/MediaCodec(19755): (0xd35f6380) release

rajeshghosh1978 avatar May 23 '19 20:05 rajeshghosh1978

Here is another one, just to provide more information

05-22 18:16:59.440 I/OMXClient(15333): Treble IOmx obtained
05-22 18:16:59.441 I/ACodec  (15333): In onAllocateComponent create compenent, codec name: OMX.google.aac.decoder
05-22 18:16:59.443 W/HwExtendedUtils(15333): hw configLocalPlayBack err = -2147483648
05-22 18:16:59.444 I/ACodec  (15333): codec does not support config priority (err -2147483648)
05-22 18:16:59.444 I/ACodec  (15333): codec does not support config operating rate (err -2147483648)
05-22 18:16:59.445 I/ACodec  (15333): onStart
05-22 18:16:59.469 I/OMXClient(15333): Treble IOmx obtained
05-22 18:16:59.471 I/ACodec  (15333): In onAllocateComponent create compenent, codec name: OMX.hisi.video.decoder.avc.secure
05-22 18:16:59.476 D/SurfaceUtils(15333): connecting to surface 0xc6965808, reason connectToSurface
05-22 18:16:59.477 I/MediaCodec(15333): [OMX.hisi.video.decoder.avc.secure] setting surface generation to 15700994
05-22 18:16:59.477 D/SurfaceUtils(15333): disconnecting from surface 0xc6965808, reason connectToSurface(reconnect)
05-22 18:16:59.477 D/SurfaceUtils(15333): connecting to surface 0xc6965808, reason connectToSurface(reconnect)
05-22 18:16:59.479 E/ACodec  (15333): [OMX.hisi.video.decoder.avc.secure] setPortMode on output to DynamicANWBuffer failed w/ err -2147483648
05-22 18:16:59.479 I/HwExtendedCodec(15333): mime is [video/avc] at setVideoFormat
05-22 18:16:59.480 I/ACodec  (15333): codec does not support config priority (err -22)
05-22 18:16:59.482 I/ACodec  (15333): onStart
05-22 18:16:59.485 E/ACodec  (15333): Failed to allocate buffers after transitioning to IDLE state (error 0x80000000)
05-22 18:16:59.485 E/ACodec  (15333): signalError(omxError 0x80001001, internalError -2147483648)
05-22 18:16:59.486 E/MediaCodec(15333): Codec reported err 0x80001001, actionCode 0, while in state 5
05-22 18:16:59.486 E/ACodec  (15333): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001009)
05-22 18:16:59.486 E/ACodec  (15333): signalError(omxError 0x80001009, internalError -2147483648)
05-22 18:16:59.486 E/ACodec  (15333): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001009)
05-22 18:16:59.486 E/ACodec  (15333): signalError(omxError 0x80001009, internalError -2147483648)
05-22 18:16:59.486 E/ACodec  (15333): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001012)
05-22 18:16:59.486 E/ACodec  (15333): signalError(omxError 0x80001012, internalError -2147483648)
05-22 18:16:59.486 E/ACodec  (15333): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001012)
05-22 18:16:59.486 E/ACodec  (15333): signalError(omxError 0x80001012, internalError -2147483648)
05-22 18:16:59.487 D/SurfaceUtils(15333): disconnecting from surface 0xc6965808, reason disconnectFromSurface
05-22 18:16:59.488 E/MediaCodec(15333): Codec reported err 0x80001009, actionCode 0, while in state 0
05-22 18:16:59.488 E/MediaCodec(15333): Codec reported err 0x80001009, actionCode 0, while in state 0
05-22 18:16:59.488 E/MediaCodec(15333): Codec reported err 0x80001012, actionCode 0, while in state 0
05-22 18:16:59.488 E/MediaCodec(15333): Codec reported err 0x80001012, actionCode 0, while in state 0
05-22 18:16:59.491 W/MediaCodecRenderer(15333): Failed to initialize decoder: OMX.hisi.video.decoder.avc.secure
05-22 18:16:59.491 W/MediaCodecRenderer(15333): android.media.MediaCodec$CodecException: start failed
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at android.media.MediaCodec.native_start(Native Method)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at android.media.MediaCodec.start(MediaCodec.java:2071)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:814)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at android.os.Handler.dispatchMessage(Handler.java:105)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at android.os.Looper.loop(Looper.java:166)
05-22 18:16:59.491 W/MediaCodecRenderer(15333): 	at android.os.HandlerThread.run(HandlerThread.java:65)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): Playback error.
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.hisi.video.decoder.avc.secure, Format(B, null, null, video/avc, avc1.4d000d, 397819, null, [416, 234, 30.0], [-1, -1])
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:479)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at android.os.Handler.dispatchMessage(Handler.java:105)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at android.os.Looper.loop(Looper.java:166)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at android.os.HandlerThread.run(HandlerThread.java:65)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.hisi.video.decoder.avc.secure, Format(B, null, null, video/avc, avc1.4d000d, 397819, null, [416, 234, 30.0], [-1, -1])
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:753)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	... 9 more
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): Caused by: android.media.MediaCodec$CodecException: start failed
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at android.media.MediaCodec.native_start(Native Method)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at android.media.MediaCodec.start(MediaCodec.java:2071)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:814)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
05-22 18:16:59.492 E/ExoPlayerImplInternal(15333): 	... 10 more
05-22 18:16:59.493 W/ACodec  (15333): forcing OMX state to Idle when received shutdown in ExecutingState

rajeshghosh1978 avatar May 23 '19 20:05 rajeshghosh1978

So far almost 50,000 playback stopped in last 7 days due to MediaCodec exception. There are more than 40 different types of Devices has this issue.

rajeshghosh1978 avatar May 23 '19 20:05 rajeshghosh1978

Any update on this

rajeshghosh1978 avatar May 30 '19 15:05 rajeshghosh1978

Just figure I'd add that I am also seeing this same error somewhat randomly on my Pixel XL with a custom MediaCodec implementation. Subscribed.

dustinkerstein avatar Jun 21 '19 22:06 dustinkerstein

Also face with this error on Huawei 8X (android 9.0) with a MediaCodec decoder.

RussMist avatar Jul 04 '19 07:07 RussMist

Another codec exception for AudioCodec as well 05-28 09:03:01.363 E/MediaDrm-JNI(12059): Illegal state exception: Failed to open session: General DRM error (-2000) 05-28 09:03:01.366 I/MediaCodec(12059): (0x94b40640) init name(OMX.google.aac.decoder) isType(0) encoder(0) 05-28 09:03:01.369 I/OMXClient(12059): Treble IOmx obtained 05-28 09:03:01.375 I/MediaCodec(12059): (0x94b40640) Component Allocated (OMX.google.aac.decoder) 05-28 09:03:01.376 I/MediaCodec(12059): (0x94b40640) configure surface(0x0) crypto(0x0) flags(0) 05-28 09:03:01.376 D/MediaCodec(12059): (0x94b40640) configure format: AMessage(what = 0x00000000) = { 05-28 09:03:01.376 D/MediaCodec(12059): float operating-rate = 48000.000000 05-28 09:03:01.376 D/MediaCodec(12059): int32_t sample-rate = 24000 05-28 09:03:01.376 D/MediaCodec(12059): string mime = "audio/mp4a-latm" 05-28 09:03:01.376 D/MediaCodec(12059): int32_t channel-count = 2 05-28 09:03:01.376 D/MediaCodec(12059): int32_t priority = 0 05-28 09:03:01.376 D/MediaCodec(12059): Buffer csd-0 = { 05-28 09:03:01.376 D/MediaCodec(12059): 00000000: 13 10 56 e5 98 ..V.. 05-28 09:03:01.376 D/MediaCodec(12059): } 05-28 09:03:01.376 D/MediaCodec(12059): } 05-28 09:03:01.376 I/ACodec (12059): codec does not support config priority (err -2147483648) 05-28 09:03:01.378 I/ACodec (12059): codec does not support config priority (err -2147483648)

rajeshghosh1978 avatar Jul 24 '19 22:07 rajeshghosh1978

It has been a long time and we are currently blocked on this issue. Any update, please?

AnilPadi avatar Aug 26 '19 21:08 AnilPadi

I have been trying to reproduce this issue from a couple of weeks and finally, I am able to reproduce this by enabling Charles. What I found this time is a bit different. Due to some Okhttp/Network interruption, Exoplayer ended up with a CodecException. Which means this is not a straight forward CodecException. So instead of stoping the playback, when retried the playback it worked for me.

Though out of 100, 30 times it was still failing for me with same CodecException. So on top of that, when I was retrying the playback, I removed the old SurfaceView and create a new one. By doing that right now our playback is stable enough. I don't know why OkHttp got "InteruptedException" intermittently and why that is related to a CodecException and also SurfaceView.

I will keep testing these changes and will update you if it will fail.

rajeshghosh1978 avatar Sep 23 '19 20:09 rajeshghosh1978

@rajeshghosh1978 @erdemguven

I am also facing this random exception on my Pixel3 Android 10

could it be as a result of android lifecycle when destroying the app onDestroy VS. onStop while onDestroy might not be called and is onStop does not contain player destroy code then decoders are not released so next time app is launched then playback fails?

   
 E/ExoPlayerImplInternal: Internal runtime error.
    android.media.MediaCodec$CodecException: Error 0x80000000
        at android.media.MediaCodec.native_queueInputBuffer(Native Method)
        at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2450)
        at com.kaltura.android.exoplayer2.video.CustomMediaCodecRenderer.feedInputBuffer(CustomMediaCodecRenderer.java:1117)
        at com.kaltura.android.exoplayer2.video.CustomMediaCodecRenderer.render(CustomMediaCodecRenderer.java:656)
        at com.kaltura.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:575)
        at com.kaltura.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:326)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:214)
        at android.os.HandlerThread.run(HandlerThread.java:67)
2019-11-14 13:12:36.253 8318-8318/com.kaltura.playkitdemo D/ExoPlayerWrapper: onPlayerError error type => 2
2019-11-14 13:12:36.254 8318-8318/com.kaltura.playkitdemo E/ExoPlayerWrapper: android.media.MediaCodec$CodecException: Error 0x80000000

---------
    2019-11-14 16:01:43.644 900-11803/? E/QSEECOMAPI: Error::send_modified_command_64 ioctl failed wtih ret = -1, errno = 12
2019-11-14 16:01:43.644 900-11803/? E/DrmWidevineDash: Error: OEMCrypto_CopyBuffer_V14 ioctl returns 4294967295, fd = 0xe
2019-11-14 16:01:43.644 900-11803/? E/DrmWidevineDash: Error: OEMCrypto_CopyBuffer_V14 failed and return = 10026
2019-11-14 16:01:43.644 900-11803/? E/DrmWidevineDash: #wv:OEMCrypto_ErrorReporting[8486] err: "OEMCrypto_CopyBuffer() error. ret= 10026"
2019-11-14 16:01:43.644 900-11803/? E/WVCdm: Decrypt error result in session sid46 during unencrypted block: 1


giladna avatar Nov 17 '19 09:11 giladna

@erdemguven @ojw28

is there a possibility that the decoders resources are not released by the OS once app is destroyed. for example the player.release was not executed in the onDestroy event since was not triggered?

giladna avatar Nov 17 '19 13:11 giladna

I have a similar issue with the pixel 2 xl device. Once the playback stops it continuously stops for all successive media playback. Putting down the logs.

E/MediaCodec: queueCSDInputBuffer failed w/ error -2147483648 2019-11-21 19:47:00.800 E/ExoPlayerImplInternal: Internal runtime error. android.media.MediaCodec$CodecException: Error 0x80000000 at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method) at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2789) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1287) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:663) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:529) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:300) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) 2019-11-21 19:47:00.807 D/BufferPoolAccessor: Destruction - bufferpool2 0x7367ebc620 cached: 0/0M, 0/0% in use; allocs: 4, 0% recycled; transfers: 0, 0% unfetced 2019-11-21 19:47:00.820 E/ExoPlayerImplInternal: Stop failed. android.media.MediaCodec$CodecException: Error 0x80000000 at android.media.MediaCodec.native_stop(Native Method) at android.media.MediaCodec.stop(MediaCodec.java:2147) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:608) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:562) at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:542) at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:153) at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:976) at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:764) at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:735) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:355) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) 2019-11-21 19:47:00.839 D/ExoPlayerWrapper: onPlayerError error type => 2 2019-11-21 19:47:00.839 E/ExoPlayerWrapper: android.media.MediaCodec$CodecException: Error 0x80000000 2019-11-21 19:47:00.839 E/ExoPlayerWrapper: Error-Event sent, type = 2

glenfordshadowfernandes avatar Nov 21 '19 14:11 glenfordshadowfernandes

hi any update for this?

giladna avatar Dec 04 '19 07:12 giladna

Any update?

acrolink avatar Feb 11 '20 07:02 acrolink

Hi all, I think for us to help with this we will need a bugreport and sample media to reproduce it ourselves. Ideally, we should able to reproduce the issue in the demo app using VOD content. It's practically impossible for us to debug a standalone stack trace originated at the framework side. Hope this helps the issue get more attention.

AquilesCanta avatar Feb 11 '20 10:02 AquilesCanta

Any updates on this, I'm also having a similar issue?

asolis90 avatar May 06 '20 20:05 asolis90

Any update on this? Having the same issue

jigneshpandav avatar Jun 29 '20 04:06 jigneshpandav

@AquilesCanta: This is something that is not 100% reproducible with a single playback URL. So a sample URL doesn't help here. Can you expose some kind of API which will release any resources related to the MediaCodec, by calling this we could release all the codec resources even before starting a new playback session? Using this we can unblock customers to play the next content.

Since we are talking about JNI here, there could be endless possibilities behind this reason, which are really hard to find the root cause. Using the API I am talking about would really help us to keep the business rolling.

rajeshghosh1978 avatar Jun 29 '20 15:06 rajeshghosh1978

Getting the same error on Flutter.

W/MediaCodecRenderer( 5681): android.media.MediaCodec$CodecException: start failed W/MediaCodecRenderer( 5681): at android.media.MediaCodec.native_start(Native Method) W/MediaCodecRenderer( 5681): at android.media.MediaCodec.start(MediaCodec.java:2132) W/MediaCodecRenderer( 5681): at d.b.b.b.f.b.a(:814) W/MediaCodecRenderer( 5681): at d.b.b.b.f.b.a(:745) W/MediaCodecRenderer( 5681): at d.b.b.b.f.b.z(:474) W/MediaCodecRenderer( 5681): at d.b.b.b.f.b.I(:1261) W/MediaCodecRenderer( 5681): at d.b.b.b.f.b.b(:1111) W/MediaCodecRenderer( 5681): at d.b.b.b.n.o.b(:552) W/MediaCodecRenderer( 5681): at d.b.b.b.f.b.a(:647) W/MediaCodecRenderer( 5681): at d.b.b.b.n.c(:529)

winfred-wong avatar Aug 28 '20 13:08 winfred-wong

Any update on this, facing the same issue. It intermittently pops up for some users.

saurabh-wynk avatar Nov 02 '20 13:11 saurabh-wynk

Also facing this issue, did anyone have any luck in regards to a solution?

RichardDapice avatar Dec 01 '20 16:12 RichardDapice

Same here with Pixel 4XL.

iozozturk avatar Jan 13 '21 22:01 iozozturk

Facing same issue with exoplayer 2.13.2. Video was able to play but no audio.

08-02 10:14:19.655 4085 4085 I TRACK_HELPER: [Line: 13]init video quality with 2 video(s) 08-02 10:14:19.656 4085 4085 I TRACK_HELPER: [Line: 25]init audio quality with 1 audio(s) 08-02 10:14:19.657 4085 4085 I TRACK_HELPER: [Line: 17]init sub tracks with 0 sub(s) 08-02 10:14:19.658 4085 4085 D ANALYTICSLISTENER: [Line: 14]onTracksChanged in update data 1001 -1 08-02 10:14:19.663 4085 4085 D ANALYTICSLISTENER: [Line: 1]onDownstreamFormatChanged 08-02 10:14:19.672 4085 1721 I OMXClient: IOmx service obtained 08-02 10:14:19.682 4085 1719 D SurfaceUtils: connecting to surface 0x95bdb008, reason connectToSurface 08-02 10:14:19.683 4085 1719 I MediaCodec: [OMX.realtek.video.decoder] setting surface generation to 4183047 08-02 10:14:19.683 4085 1719 D SurfaceUtils: disconnecting from surface 0x95bdb008, reason connectToSurface(reconnect) 08-02 10:14:19.683 4085 1719 D SurfaceUtils: connecting to surface 0x95bdb008, reason connectToSurface(reconnect) 08-02 10:14:19.690 4085 1721 E ACodec : [OMX.realtek.video.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -2147483648 08-02 10:14:19.697 4085 1721 I ACodec : codec does not support config priority (err -1010) 08-02 10:14:19.715 4085 1721 D SurfaceUtils: disconnecting from surface 0x95bdb008, reason setNativeWindowSizeFormatAndUsage 08-02 10:14:19.716 4085 1721 D SurfaceUtils: connecting to surface 0x95bdb008, reason setNativeWindowSizeFormatAndUsage 08-02 10:14:19.720 4085 1721 D SurfaceUtils: set up nativeWindow 0x95bdb008 for 1920x1080, color 0x23, rotation 0, usage 0x10402930 08-02 10:14:20.287 4085 1721 W ColorUtils: expected specified color aspects (0:1:1:3) 08-02 10:14:20.289 4085 1721 W ACodec : [OMX.realtek.video.decoder] BAD CODEC: Output format changed unexpectedly from (diff) AMessage(what = 0x00000000) = { 08-02 10:14:20.289 4085 1721 W ACodec : int32_t android._dataspace = 260 08-02 10:14:20.289 4085 1721 W ACodec : } to (diff) AMessage(what = 0x00000000) = { 08-02 10:14:20.289 4085 1721 W ACodec : int32_t android._dataspace = 12648448 08-02 10:14:20.289 4085 1721 W ACodec : } 08-02 10:14:20.302 4085 4085 D ANALYTICSLISTENER: [Line: 1]onVideoSizeChanged 08-02 10:14:20.303 4085 4085 D ANALYTICSLISTENER: [Line: 1]onRenderedFirstFrame

dzungvu avatar Aug 02 '21 04:08 dzungvu

having the same issue and it only happens to Huawei devices

hong7463 avatar Dec 01 '22 07:12 hong7463

any update??this issue pending from long time and happens now also

sridhard avatar Jun 24 '23 08:06 sridhard

having the same issue and it only happens to Android 12、Android 13 devices

JungleJie avatar Nov 23 '23 07:11 JungleJie