androidmedia: Fix crashes when loading the plugin in a standalone application on...
authorSebastian Dröge <sebastian@centricular.com>
Mon, 2 Jun 2014 09:16:32 +0000 (11:16 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 2 Jun 2014 09:18:38 +0000 (11:18 +0200)
commit0c93a82861496e7cbd8922ae12cb45c30357ced1
tree17e6f73dcc24dbb3e037062f36f90fc7ef2d2516
parent16fd917632c0992349ca28cf9108e9562c493ad7
androidmedia: Fix crashes when loading the plugin in a standalone application on Android >= 4.4

Check if libnativehelper is loaded in the process and if
it has these awful wrappers for JNI_CreateJavaVM and
JNI_GetCreatedJavaVMs that crash the app if you don't
create a JniInvocation instance first. If it isn't we
just fail here and don't initialize anything.

See this code for reference:
https://android.googlesource.com/platform/libnativehelper/+/master/JniInvocation.cpp
sys/androidmedia/gstamc.c