Pergunta

Keep getting a Fatal Signal 11 crash. I have debugged it down to the following line of code

int outBuffIdx = codec.dequeueOutputBuffer(null, 16000);

The first time it passes this line of code it returns -1 for Format change, but the next time it just crashes.

Looking into the error it is saying it has something to do with a null reference variable, but the both the input and output buffers should not be null.

Foi útil?

Solução

Try setting the BufferInfo param, instead of passing null.

BufferInfo buffInfo = new MediaCodec.BufferInfo();
int outBuffIdx = codec.dequeueOutputBuffer(buffInfo, 16000);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top