Question

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.

Was it helpful?

Solution

Try setting the BufferInfo param, instead of passing null.

BufferInfo buffInfo = new MediaCodec.BufferInfo();
int outBuffIdx = codec.dequeueOutputBuffer(buffInfo, 16000);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top