Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I just wanted to add something to berak's answer:

I encountered this problem as well, but had to return a jbyteArray (I'm using JNI and want a byte[] to return to the Java part). So I added this to obtain a jbyteArray out of the byte * bytes:

jbyteArray resultByteArray = env->NewByteArray(size);
env->SetByteArrayRegion(resultByteArray, 0, size, bytes);
env->ReleaseByteArrayElements(yuv, _yuv, 0);

return resultByteArray;