[Android] [PATCH 1/3] jni: use a define for JNI_VERSION
Thomas Guillem
tom at gllm.fr
Tue Oct 14 11:35:36 CEST 2014
---
vlc-android/jni/libvlcjni.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 8406a87..e67e361 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -52,6 +52,8 @@
#define NO_IOMX_DR ""
#endif
+#define VLC_JNI_VERSION JNI_VERSION_1_2
+
static void add_media_options(libvlc_media_t *p_md, JNIEnv *env, jobjectArray mediaOptions)
{
int stringCount = (*env)->GetArrayLength(env, mediaOptions);
@@ -121,7 +123,7 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data)
if (eventHandlerInstance == NULL)
return;
- if ((*myVm)->GetEnv(myVm, (void**) &env, JNI_VERSION_1_2) < 0) {
+ if ((*myVm)->GetEnv(myVm, (void**) &env, VLC_JNI_VERSION) < 0) {
if ((*myVm)->AttachCurrentThread(myVm, &env, NULL) < 0)
return;
isAttached = true;
@@ -209,7 +211,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved)
pthread_cond_init(&vout_android_surf_attached, NULL);
LOGD("JNI interface loaded.");
- return JNI_VERSION_1_2;
+ return VLC_JNI_VERSION;
}
void JNI_OnUnload(JavaVM* vm, void* reserved) {
--
2.1.0
More information about the Android
mailing list