Domanda

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.

È stato utile?

Soluzione

Try setting the BufferInfo param, instead of passing null.

BufferInfo buffInfo = new MediaCodec.BufferInfo();
int outBuffIdx = codec.dequeueOutputBuffer(buffInfo, 16000);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top