]> git.sesse.net Git - vlc/commitdiff
make playlist stop synchronous
authorFilippo Carone <littlejohn@videolan.org>
Thu, 19 Oct 2006 21:55:31 +0000 (21:55 +0000)
committerFilippo Carone <littlejohn@videolan.org>
Thu, 19 Oct 2006 21:55:31 +0000 (21:55 +0000)
bindings/java/src/playlist-jni.cc

index 44459845b3f791d59f455c6aef12056aac05ae23..041fe4e18231bbd4bdc36b561c0e94faf87b614a 100644 (file)
@@ -26,6 +26,8 @@
 /* These are a must*/\r
 #include <jni.h>\r
 #include <vlc/libvlc.h>\r
+#include <unistd.h>\r
+#include <stdio.h>\r
 \r
 /* JVLC internal imports, generated by gcjh */\r
 #include "../includes/Playlist.h"\r
@@ -111,6 +113,12 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Playlist__1stop (JNIEnv *env, jobj
     INIT_FUNCTION ;\r
 \r
     libvlc_playlist_stop( ( libvlc_instance_t* ) instance, exception );\r
+    \r
+    while ( libvlc_playlist_isplaying( (libvlc_instance_t*) instance, exception ) )\r
+    {\r
+        usleep(100);\r
+    }\r
+    \r
 \r
     CHECK_EXCEPTION_FREE ;\r
 }\r