[Android] MediaList: fix loadPlaylist()

Edward Wang git at videolan.org
Mon Oct 28 04:14:41 CET 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Oct 27 21:39:41 2013 -0400| [e9fe283ef6ed48283e548d0300f48c7ff32798f6] | committer: Edward Wang

MediaList: fix loadPlaylist()

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e9fe283ef6ed48283e548d0300f48c7ff32798f6
---

 vlc-android/jni/libvlcjni-medialist.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/vlc-android/jni/libvlcjni-medialist.c b/vlc-android/jni/libvlcjni-medialist.c
index 15901e7..1944a94 100644
--- a/vlc-android/jni/libvlcjni-medialist.c
+++ b/vlc-android/jni/libvlcjni-medialist.c
@@ -86,8 +86,7 @@ jint Java_org_videolan_libvlc_MediaList_expandMedia(JNIEnv *env, jobject thiz, j
         );
 }
 
-void Java_org_videolan_libvlc_MediaList_loadPlaylist(JNIEnv *env, jobject thiz, jobject libvlcJava, jstring mrl) {
-    libvlc_media_list_t* p_ml = getMediaListFromJava(env, thiz);
+void Java_org_videolan_libvlc_MediaList_loadPlaylist(JNIEnv *env, jobject thiz, jobject libvlcJava, jstring mrl, jobject items) {
     const char* p_mrl = (*env)->GetStringUTFChars(env, mrl, NULL);
 
     libvlc_media_t *p_md = libvlc_media_new_location((libvlc_instance_t*)(intptr_t)getLong(env, libvlcJava, "mLibVlcInstance"), p_mrl);
@@ -121,9 +120,7 @@ void Java_org_videolan_libvlc_MediaList_loadPlaylist(JNIEnv *env, jobject thiz,
 
     libvlc_media_player_release(p_mp);
 
-    libvlc_media_list_lock(p_ml);
     expand_media_internal(env, (libvlc_instance_t*)(intptr_t)getLong(env, libvlcJava, "mLibVlcInstance"), items, p_md);
-    libvlc_media_list_unlock(p_ml);
 
     (*env)->ReleaseStringUTFChars(env, mrl, p_mrl);
 }



More information about the Android mailing list