]> git.sesse.net Git - vlc/blobdiff - src/stream_output/announce.c
macosx: Add a missing PL_LOCK in the wizard.
[vlc] / src / stream_output / announce.c
index 4c183cce54b7f05d82e43b8f9fcdf36f2d5831a5..7dedc1e0508c412716c6c08213d29f5bd8243f11 100644 (file)
@@ -28,7 +28,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_sout.h>
 #include "stream_output.h"
 
@@ -159,10 +159,7 @@ static announce_handler_t *announce_HandlerCreate( vlc_object_t *p_this )
     p_announce = vlc_object_create( p_this, VLC_OBJECT_ANNOUNCE );
 
     if( !p_announce )
-    {
-        msg_Err( p_this, "out of memory" );
         return NULL;
-    }
 
     p_announce->p_sap = NULL;
     vlc_object_attach( p_announce, p_this->p_libvlc);
@@ -180,14 +177,12 @@ int announce_HandlerDestroy( announce_handler_t *p_announce )
 {
     if( p_announce->p_sap )
     {
-        vlc_object_kill ((vlc_object_t *)p_announce->p_sap);
-        /* Wait for the SAP thread to exit */
-        vlc_thread_join( (vlc_object_t *)p_announce->p_sap );
-        announce_SAPHandlerDestroy( p_announce->p_sap );
+        /* Exit the SAP */
+        vlc_object_release( p_announce->p_sap );
     }
 
     /* Free the structure */
-    vlc_object_destroy( p_announce );
+    vlc_object_release( p_announce );
 
     return VLC_SUCCESS;
 }