[Android] libvlcjni: update libvlc_media_player_set_android_context call

Thomas Guillem git at videolan.org
Wed Feb 24 09:37:51 CET 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 23 17:14:23 2016 +0100| [b6220441393ea2aba1add88007f5288dea346bb8] | committer: Thomas Guillem

libvlcjni: update libvlc_media_player_set_android_context call

> https://code.videolan.org/videolan/vlc-android/commit/b6220441393ea2aba1add88007f5288dea346bb8
---

 libvlc/jni/libvlcjni-mediaplayer.c | 4 +---
 libvlc/jni/libvlcjni.c             | 7 -------
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/libvlc/jni/libvlcjni-mediaplayer.c b/libvlc/jni/libvlcjni-mediaplayer.c
index d02f427..d3082b6 100644
--- a/libvlc/jni/libvlcjni-mediaplayer.c
+++ b/libvlc/jni/libvlcjni-mediaplayer.c
@@ -26,7 +26,6 @@
 
 #define THREAD_NAME "libvlcjni"
 JNIEnv *jni_get_env(const char *name);
-extern JavaVM *libvlc_get_jvm();
 
 static const libvlc_event_type_t mp_events[] = {
     libvlc_MediaPlayerOpening,
@@ -118,8 +117,7 @@ MediaPlayer_newCommon(JNIEnv *env, jobject thiz, vlcjni_object *p_obj,
         throw_IllegalStateException(env, "can't create MediaPlayer instance");
         return;
     }
-    libvlc_media_player_set_android_context(p_obj->u.p_mp, libvlc_get_jvm(),
-                                            p_obj->p_sys->jwindow);
+    libvlc_media_player_set_android_context(p_obj->u.p_mp, p_obj->p_sys->jwindow);
 
     VLCJniObject_attachEvents(p_obj, MediaPlayer_event_cb,
                               libvlc_media_player_event_manager(p_obj->u.p_mp),
diff --git a/libvlc/jni/libvlcjni.c b/libvlc/jni/libvlcjni.c
index a72e3a7..bb5dd54 100644
--- a/libvlc/jni/libvlcjni.c
+++ b/libvlc/jni/libvlcjni.c
@@ -34,7 +34,6 @@
 
 #include <android/api-level.h>
 
-#include "libvlcjni-modules.h"
 #include "libvlcjni-vlcobject.h"
 #include "utils.h"
 #include "native_crash_handler.h"
@@ -53,12 +52,6 @@ JNIEnv *jni_get_env(const char *name);
  */
 static JavaVM *myVm;
 
-JavaVM *
-libvlc_get_jvm()
-{
-    return myVm;
-}
-
 static pthread_key_t jni_env_key;
 
 /* This function is called when a thread attached to the Java VM is canceled or



More information about the Android mailing list