[Android] libvlcjni-medialist: fix libvlc_media_list_new() call in 4.0
Alexandre Janniaux
git at videolan.org
Thu Jul 30 09:50:56 CEST 2020
vlc-android | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Tue Jul 28 15:00:01 2020 +0200| [5da61399cda456b03518ea146ac765aae31a45d6] | committer: Alexandre Janniaux
libvlcjni-medialist: fix libvlc_media_list_new() call in 4.0
In 4.0, since 97a47946d70ab374dec5039b8ad445fe6eba8d1c, there is no
instance parameter for this function.
> https://code.videolan.org/videolan/vlc-android/commit/5da61399cda456b03518ea146ac765aae31a45d6
---
libvlc/jni/libvlcjni-medialist.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libvlc/jni/libvlcjni-medialist.c b/libvlc/jni/libvlcjni-medialist.c
index b074ef9e8..6722611f0 100644
--- a/libvlc/jni/libvlcjni-medialist.c
+++ b/libvlc/jni/libvlcjni-medialist.c
@@ -67,7 +67,11 @@ Java_org_videolan_libvlc_MediaList_nativeNewFromLibVlc(JNIEnv *env,
if (!p_obj)
return;
+#if LIBVLC_VERSION_MAJOR && LIBVLC_VERSION_MAJOR >= 4
+ p_obj->u.p_ml = libvlc_media_list_new();
+#else
p_obj->u.p_ml = libvlc_media_list_new(p_obj->p_libvlc);
+#endif
MediaList_nativeNewCommon(env, thiz, p_obj);
}
More information about the Android
mailing list