]> git.sesse.net Git - vlc/blobdiff - modules/access_output/bonjour.c
Qt4 - SPrefs, doing funny things with qobject_cast to improve a bit the code...
[vlc] / modules / access_output / bonjour.c
index 1f21a7fe7a6b43000af955b76c37d4d7979570cf..0ee48469f1498896336fd110e842e1bb1434fa27 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
 
 #include <vlc/vlc.h>
+#include "bonjour.h"
 
 #ifdef HAVE_AVAHI_CLIENT
-#include <vlc/intf.h>
-#include <vlc/sout.h>
+#include <vlc_sout.h>
 
 #include <avahi-client/client.h>
 #ifdef HAVE_AVAHI_06
@@ -190,8 +189,8 @@ static void poll_iterate_thread( poll_thread_t *p_pt )
 /*****************************************************************************
  * bonjour_start_service
  *****************************************************************************/
-void *bonjour_start_service( vlc_object_t *p_log, char *psz_stype,
-                            char *psz_name, int i_port, char *psz_txt )
+void *bonjour_start_service( vlc_object_t *p_log, const char *psz_stype,
+                             const char *psz_name, int i_port, char *psz_txt )
 {
     int err;
     bonjour_t *p_sys;
@@ -290,12 +289,8 @@ void bonjour_stop_service( void *_p_sys )
 {
     bonjour_t *p_sys = (bonjour_t *)_p_sys;
 
-    if( p_sys->poll_thread->b_thread )
-    {
-        p_sys->poll_thread->b_die = 1;
-        vlc_thread_join( p_sys->poll_thread );
-    }
-
+    vlc_object_kill( p_sys->poll_thread );
+    vlc_thread_join( p_sys->poll_thread );
     vlc_object_destroy( p_sys->poll_thread );
 
     if( p_sys->group != NULL )