toro
toro copied to clipboard
Insufficient resources while initialising MediaCodec in Exoplayer
After playing several videos in the same app session, onPlayerError()
starts getting invoked with below error message
com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(1/27, null, video/avc, -1, null, [1920, 1080, -1.0], [-1, -1])
On further debugging, it was discovered that MediaCodec.java
is throwing that exception with error code ERROR_INSUFFICIENT_RESOURCE
.
This is also supported by the behaviour of error. Its frequency significantly increases on low performance devices, and error starts occurring after only 5-6 videos. I am streaming HLS videos on all the players. Can this be because of memory leaks and Decoder instance not getting cleaned up?
Thanks in advance!
@eneim Any update on this?
@prat-z really sorry. I may have forgotten this issue. Let me take a look. I think the number of MediaCodec is used up. Normally the MediaCodec is released if it is not in used. I will push some update in next few days ...
Did you solve this issue?
@congdanh1608 Please try latest release to see if it resolves your case.
Thanks @eneim I will try. But I hope the release with Exoplayer 2.8.0 will come soon. Because my project has a little complex with Exoplayer and exomedia version.