]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
Implement Lua objects in the C code directly. Fix most type checks. Move every thing...
[vlc] / src / libvlc.c
index ec267bc42f66e9ffb267826456d4b9f4db6075cf..24e391319d607d3f26f61c618b23e52c30829903 100644 (file)
@@ -943,24 +943,6 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
     }
 
 #ifdef ENABLE_SOUT
-    playlist_t         * p_playlist;
-    sout_instance_t    * p_sout;
-
-    p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD );
-    if( p_playlist )
-    {
-        p_sout = vlc_object_find( p_playlist, VLC_OBJECT_SOUT, FIND_CHILD );
-        if( p_sout )
-        {
-            msg_Dbg( p_sout, "removing kept stream output" );
-            vlc_object_detach( (vlc_object_t*)p_sout );
-            vlc_object_release( (vlc_object_t*)p_sout );
-            sout_DeleteInstance( p_sout );
-        }
-
-        vlc_object_release( p_playlist );
-    }
-
     /* Destroy VLM if created in libvlc_InternalInit */
     if( priv->p_vlm )
     {
@@ -968,6 +950,10 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
     }
 #endif
 
+    /* Remove all services discovery */
+    msg_Dbg( p_libvlc, "removing all services discovery tasks" );
+    playlist_ServicesDiscoveryKillAll( priv->p_playlist );
+
     /* Free playlist */
     msg_Dbg( p_libvlc, "removing playlist" );
     vlc_object_release( priv->p_playlist );
@@ -1133,7 +1119,6 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module )
     }
 
     /* Try to run the interface */
-    p_intf->b_play = false; /* TODO: remove b_play completely */
     i_err = intf_RunThread( p_intf );
     if( i_err )
     {
@@ -1347,9 +1332,10 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name )
     psz_spaces_text[PADDING_SPACES+LINE_START] = '\0';
     memset( psz_spaces_longtext, ' ', LINE_START+2 );
     psz_spaces_longtext[LINE_START+2] = '\0';
-#ifdef WIN32
-    b_color = false; // don't put color control codes in a .txt file
+#ifndef WIN32
+    if( !isatty( 1 ) )
 #endif
+        b_color = false; // don't put color control codes in a .txt file
 
     if( b_color )
     {