[Android] LibVLC: update discoverer API
Thomas Guillem
git at videolan.org
Tue Sep 27 19:12:31 CEST 2016
vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 27 19:08:18 2016 +0200| [d2005b88093b2896556fdde28c49b07583e210f0] | committer: Thomas Guillem
LibVLC: update discoverer API
> https://code.videolan.org/videolan/vlc-android/commit/d2005b88093b2896556fdde28c49b07583e210f0
---
libvlc/jni/libvlcjni-mediadiscoverer.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/libvlc/jni/libvlcjni-mediadiscoverer.c b/libvlc/jni/libvlcjni-mediadiscoverer.c
index 9239371..e4da29b 100644
--- a/libvlc/jni/libvlcjni-mediadiscoverer.c
+++ b/libvlc/jni/libvlcjni-mediadiscoverer.c
@@ -112,16 +112,15 @@ 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_t **pp_services = NULL;
- ssize_t i_nb_services = 0;
+ size_t i_nb_services = 0;
jobjectArray array;
if (!p_lib_obj)
return NULL;
i_nb_services =
- libvlc_media_discoverer_list_get( p_libvlc, i_category,
- &pp_services);
- if (i_nb_services <= 0)
+ libvlc_media_discoverer_list_get( p_libvlc, i_category, &pp_services);
+ if (i_nb_services == 0)
return NULL;
array = (*env)->NewObjectArray(env, i_nb_services,
@@ -130,7 +129,7 @@ Java_org_videolan_libvlc_MediaDiscoverer_nativeList(JNIEnv *env, jobject thiz,
if (!array)
goto error;
- for (size_t i = 0; i < (size_t) i_nb_services; ++i)
+ for (size_t i = 0; i < i_nb_services; ++i)
{
jobject jservice = service_to_object(env, pp_services[i]);
More information about the Android
mailing list