[Android] jni: use a define for JNI_VERSION
Thomas Guillem
git at videolan.org
Tue Oct 14 15:47:13 CEST 2014
vlc-ports/android | branch: master | Thomas Guillem <tom at gllm.fr> | Tue Oct 14 11:35:36 2014 +0200| [35fa44b77760909281891c30b26ce954f93dbf9d] | committer: Jean-Baptiste Kempf
jni: use a define for JNI_VERSION
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=35fa44b77760909281891c30b26ce954f93dbf9d
---
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) {
More information about the Android
mailing list