[Android] LibVLC: udpdate with last API change
Thomas Guillem
git at videolan.org
Fri Jul 22 15:02:19 CEST 2016
vlc-android | branch: 2.0.x | Thomas Guillem <thomas at gllm.fr> | Wed Jul 20 13:31:16 2016 +0200| [92c73cd04b85f687bbe34f6809ae0ab034e0879a] | committer: Jean-Baptiste Kempf
LibVLC: udpdate with last API change
(cherry picked from commit bb42f9037f8b6e2a8be300fe4cf6dcac7ce89849)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> https://code.videolan.org/videolan/vlc-android/commit/92c73cd04b85f687bbe34f6809ae0ab034e0879a
---
libvlc/jni/libvlcjni-mediadiscoverer.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libvlc/jni/libvlcjni-mediadiscoverer.c b/libvlc/jni/libvlcjni-mediadiscoverer.c
index 8a82352..9239371 100644
--- a/libvlc/jni/libvlcjni-mediadiscoverer.c
+++ b/libvlc/jni/libvlcjni-mediadiscoverer.c
@@ -91,7 +91,7 @@ Java_org_videolan_libvlc_MediaDiscoverer_nativeStop(JNIEnv *env, jobject thiz)
static jobject
-service_to_object(JNIEnv *env, libvlc_media_discoverer_description *p_service)
+service_to_object(JNIEnv *env, libvlc_media_discoverer_description_t *p_service)
{
jstring jname = NULL;
jstring jlongName = NULL;
@@ -111,8 +111,8 @@ Java_org_videolan_libvlc_MediaDiscoverer_nativeList(JNIEnv *env, jobject thiz,
{
vlcjni_object *p_lib_obj = VLCJniObject_getInstance(env, libVlc);
libvlc_instance_t *p_libvlc = p_lib_obj->u.p_libvlc;
- libvlc_media_discoverer_description **pp_services = NULL;
- unsigned int i_nb_services = 0;
+ libvlc_media_discoverer_description_t **pp_services = NULL;
+ ssize_t i_nb_services = 0;
jobjectArray array;
if (!p_lib_obj)
@@ -121,7 +121,7 @@ Java_org_videolan_libvlc_MediaDiscoverer_nativeList(JNIEnv *env, jobject thiz,
i_nb_services =
libvlc_media_discoverer_list_get( p_libvlc, i_category,
&pp_services);
- if (i_nb_services == 0)
+ if (i_nb_services <= 0)
return NULL;
array = (*env)->NewObjectArray(env, i_nb_services,
@@ -130,7 +130,7 @@ Java_org_videolan_libvlc_MediaDiscoverer_nativeList(JNIEnv *env, jobject thiz,
if (!array)
goto error;
- for (int i = 0; i < i_nb_services; ++i)
+ for (size_t i = 0; i < (size_t) i_nb_services; ++i)
{
jobject jservice = service_to_object(env, pp_services[i]);
More information about the Android
mailing list