[Android] MediaList: fix clear
Sébastien Toque
git at videolan.org
Thu Aug 29 22:17:42 CEST 2013
vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Thu Aug 29 22:17:33 2013 +0200| [5d72567145222cac935d39095d6e15bf89550eda] | committer: Sébastien Toque
MediaList: fix clear
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=5d72567145222cac935d39095d6e15bf89550eda
---
vlc-android/jni/libvlcjni-medialist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/jni/libvlcjni-medialist.c b/vlc-android/jni/libvlcjni-medialist.c
index 079bff2..80ebcd0 100644
--- a/vlc-android/jni/libvlcjni-medialist.c
+++ b/vlc-android/jni/libvlcjni-medialist.c
@@ -186,7 +186,7 @@ void Java_org_videolan_libvlc_MediaList_nativeDestroy(JNIEnv *env, jobject thiz)
void Java_org_videolan_libvlc_MediaList_clear(JNIEnv *env, jobject thiz) {
libvlc_media_list_t* p_ml = getMediaListFromJava(env, thiz);
libvlc_media_list_lock(p_ml);
- for(int i = 0; i < libvlc_media_list_count(p_ml); i++) {
+ while (libvlc_media_list_count(p_ml) > 0) {
libvlc_media_list_remove_index(p_ml, 0);
}
libvlc_media_list_unlock(p_ml);
More information about the Android
mailing list