An error occurs when the switchTargetView method is called 20-40 times in a situation where there are 2 or multiple playerviews.
I want SwitchTargetView method executes without error no matter how many times I try.
The error log is attached.
2022-03-28 20:43:40.354 6980-7186/com.staby.going.dev E/ACodec: [OMX.Exynos.avc.dec] ERROR(0x90000005)
2022-03-28 20:43:40.354 6980-7186/com.staby.going.dev E/ACodec: signalError(omxError 0x90000005, internalError -2147483648)
2022-03-28 20:43:40.354 6980-7185/com.staby.going.dev E/MediaCodec: Codec reported err 0x90000005, actionCode 0, while in state 6/STARTED
2022-03-28 20:43:40.354 6980-7185/com.staby.going.dev E/Surface: freeAllBuffers: 11 buffers were freed while being dequeued!
2022-03-28 20:43:40.355 6980-7172/com.staby.going.dev E/Surface: freeAllBuffers: 11 buffers were freed while being dequeued!
2022-03-28 20:43:40.362 6980-7119/com.staby.going.dev E/MediaCodecVideoRenderer: Video codec error
java.lang.IllegalStateException
at android.media.MediaCodec.releaseOutputBuffer(Native Method)
at android.media.MediaCodec.releaseOutputBufferInternal(MediaCodec.java:3651)
at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:3625)
at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecAdapter.releaseOutputBuffer(AsynchronousMediaCodecAdapter.java:200)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.renderOutputBufferV21(MediaCodecVideoRenderer.java:1247)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.processOutputBuffer(MediaCodecVideoRenderer.java:1012)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1881)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:792)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:997)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:498)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
2022-03-28 20:43:40.364 6980-7119/com.staby.going.dev E/ExoPlayerImplInternal: Playback error
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(0, null, null, video/avc, avc1.4D4028, 9640000, null, [1920, 1080, 30.0], [-1, -1]), format_supported=YES
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:574)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: OMX.Exynos.avc.dec
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1512)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:813)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:997)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:498)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalStateException
at android.media.MediaCodec.releaseOutputBuffer(Native Method)
at android.media.MediaCodec.releaseOutputBufferInternal(MediaCodec.java:3651)
at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:3625)
at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecAdapter.releaseOutputBuffer(AsynchronousMediaCodecAdapter.java:200)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.renderOutputBufferV21(MediaCodecVideoRenderer.java:1247)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.processOutputBuffer(MediaCodecVideoRenderer.java:1012)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1881)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:792)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:997)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:498)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
2022-03-28 20:43:40.366 6980-7119/com.staby.going.dev E/ExoPlayerImplInternal: Disable failed.
java.lang.IllegalStateException
at android.media.MediaCodec.native_flush(Native Method)
at android.media.MediaCodec.flush(MediaCodec.java:2350)
at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecAdapter.flush(AsynchronousMediaCodecAdapter.java:237)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:864)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:857)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:710)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:561)
at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:186)
at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1670)
at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1410)
at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1373)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:590)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
2022-03-28 20:43:40.381 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e58c0b0
2022-03-28 20:43:40.383 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e58cf50
2022-03-28 20:43:40.385 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e59c490
2022-03-28 20:43:40.386 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e591ab0
2022-03-28 20:43:40.387 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e5a84f0
2022-03-28 20:43:40.389 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e592dd0
2022-03-28 20:43:40.392 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e590f70
2022-03-28 20:43:40.393 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e5b9890
2022-03-28 20:43:40.400 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e5b6290
2022-03-28 20:43:40.401 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e5a9ff0
2022-03-28 20:43:40.403 6980-7186/com.staby.going.dev E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7a6e5ab1f0
The way I tried is to add the following inside the codecNeedsSetOutputSurfaceWorkaround method of the
MediaCodecVideoRenderer class:
As a result, the error is resolved, but the black screen fills and disappears while the player view is toggled.
I want a smooth transition without the black screen filling up. can i know how to solve it?
An error occurs when the switchTargetView method is called 20-40 times in a situation where there are 2 or multiple playerviews. I want SwitchTargetView method executes without error no matter how many times I try. The error log is attached.
The way I tried is to add the following inside the codecNeedsSetOutputSurfaceWorkaround method of the MediaCodecVideoRenderer class:
As a result, the error is resolved, but the black screen fills and disappears while the player view is toggled. I want a smooth transition without the black screen filling up. can i know how to solve it?