0
votes

I try to run ExoPlayer demo app on my device, but I've had this problem:

outputIndex = codec.dequeueOutputBuffer(outputBufferInfo, 0);

always returns -1.

I viewed all questions and answers on stackoverflow, but nothing could help me. I set sps and pps header in csd-0 and csd-1 buffer in MediaFormat (I tried it with start code and without), set it in one buffer csd-0, called queueInputBuffer with MediaCodec.BUFFER_FLAG_CODEC_CONFIG, changed timeout to 10000 and even to -1. Everything works on other devices, but not where I need. Decoder - OMX.amlogic.avc.decoder.awesome

EDIT If I set timeout to -1, then nothing happens, I wait for dequeueOutputBuffer, but logcat shows:

Warning message AMessage(what = 'omx ', target = 5) = {
int32_t type = 0
void *node = 0x51
int32_t event = 2130706433
int32_t data1 = 0
int32_t data2 = 0
} unhandled in root state.

EDIT 2: I've found, that amlogic decoder's output buffer size is smaller, than input. But on other devices, where video always shows, the situation is reverse: output buffer size is bigger. Is it important?

Maybe someone had the same problem? Is it codec specification? What else I need to try?

Check the logcat output for anything suspicious. With a timeout of -1 it should stall forever, so if it's returning immediately with -1 when you've given it an infinite timeout then it sounds like something isn't being configured happily.fadden
Please, look at my edited answerJane
Could it be possible that the underlying decoder is outputting the frame in metadata format? What is the size of the decoder's output buffer?Ganesh
@Ganesh the size of output buffer - 4, input - 8. Unlike another test device, where output size 23 and input 4.Jane
@Ganesh please help if you have idea.Jane