Commit 35fa44b7 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

jni: use a define for JNI_VERSION

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 4810f7d4
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#define NO_IOMX_DR "" #define NO_IOMX_DR ""
#endif #endif
#define VLC_JNI_VERSION JNI_VERSION_1_2
static void add_media_options(libvlc_media_t *p_md, JNIEnv *env, jobjectArray mediaOptions) static void add_media_options(libvlc_media_t *p_md, JNIEnv *env, jobjectArray mediaOptions)
{ {
int stringCount = (*env)->GetArrayLength(env, mediaOptions); int stringCount = (*env)->GetArrayLength(env, mediaOptions);
...@@ -121,7 +123,7 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data) ...@@ -121,7 +123,7 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data)
if (eventHandlerInstance == NULL) if (eventHandlerInstance == NULL)
return; 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) if ((*myVm)->AttachCurrentThread(myVm, &env, NULL) < 0)
return; return;
isAttached = true; isAttached = true;
...@@ -209,7 +211,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) ...@@ -209,7 +211,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved)
pthread_cond_init(&vout_android_surf_attached, NULL); pthread_cond_init(&vout_android_surf_attached, NULL);
LOGD("JNI interface loaded."); LOGD("JNI interface loaded.");
return JNI_VERSION_1_2; return VLC_JNI_VERSION;
} }
void JNI_OnUnload(JavaVM* vm, void* reserved) { void JNI_OnUnload(JavaVM* vm, void* reserved) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment