Page 1 of 1

mediacodec decoder: AMediaCodec.configure failed

Posted: 28 Mar 2016 16:36
by dvblogic
I am writing a libvlc-based player for Android platform. The player is tested on Nexus Player, running Android 6.0.1.
libvlc version is 3.0.0-1.9.6, full hardware acceleration is turned on.

The issue is that when playback is switch between streams with SD mpeg-2 video and HD x264 video, video decoder stops working.
The log file reports:

Code: Select all

03-28 15:59:16.542 169-527/? E/BufferQueueProducer﹕ [SurfaceView] connect(P): already connected (cur=2 req=3) 03-28 15:59:16.542 2668-2824/com.dvblogic.dvblinklive I/MediaCodec﹕ native window already connected. Assuming no change of surface 03-28 15:59:16.542 2668-2818/com.dvblogic.dvblinklive E/MediaCodec﹕ configure failed with err 0xffffffea, resetting... ..... 03-28 15:59:16.548 2668-2818/com.dvblogic.dvblinklive E/NdkMediaCodec﹕ sf error code: -22 03-28 15:59:16.549 2668-2818/com.dvblogic.dvblinklive E/VLC﹕ [f7bdf9a4] mediacodec decoder: AMediaCodec.configure failed
If hardware acceleration is set to video or turned off, video decoder continues to work properly after stream switch (albeit with performance related artifacts).
The correct behavior can be restored by exiting and re-entering application. Deleting and re-initializing libvlc/mediaplayer does not help.

Any pointers or help is highly welcome and much appreciated.

Thank you.

Re: mediacodec decoder: AMediaCodec.configure failed

Posted: 28 Jun 2016 09:56
by Jean-Baptiste Kempf
You need to fix that yourself, unfortunately.

Re: mediacodec decoder: AMediaCodec.configure failed

Posted: 06 Mar 2017 15:34
by SaundersB
What I think he means is that you need to manually reinitialize the libVLC instance yourself along with the other things you specified.