Commit bb42f903 authored by Thomas Guillem's avatar Thomas Guillem

LibVLC: udpdate with last API change

parent cac5f75d
......@@ -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]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment