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?