]> git.sesse.net Git - vlc/commitdiff
* ALL: releasing a few unreleased objects.
authorChristophe Massiot <massiot@videolan.org>
Fri, 5 Aug 2005 13:45:56 +0000 (13:45 +0000)
committerChristophe Massiot <massiot@videolan.org>
Fri, 5 Aug 2005 13:45:56 +0000 (13:45 +0000)
modules/gui/macosx/extended.m
modules/gui/macosx/intf.m
modules/gui/macosx/playlist.m
modules/gui/macosx/vout.m
modules/gui/wxwidgets/extrapanel.cpp
src/stream_output/stream_output.c

index 2c60bf5a916ae4c7b2ca09f22e72fbc6f08b99cb..72c513c2b369dc97a0470c2bec9e0d8936da1596 100644 (file)
@@ -275,6 +275,7 @@ static VLCExtended *_o_sharedInstance = nil;
             msg_Warn( p_intf, "cannot find adjust-image-subfilter related to " \
                 "moved slider");
         }
+        vlc_object_release( p_vout );
     }
 }
 
index e9bc0cf76a7bec516c4198e241114a3f7f9ea860..d7fdea48004112fa06d18365343b83af69772bef 100644 (file)
@@ -1311,6 +1311,14 @@ static VLCMain *_o_sharedMainInstance = nil;
     playlist_t * p_playlist;
     vout_thread_t * p_vout;
 
+#define p_input p_intf->p_sys->p_input
+    if( p_input )
+    {
+        vlc_object_release( p_input );
+        p_input = NULL;
+    }
+#undef p_input
+
     /* Stop playback */
     if( ( p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                         FIND_ANYWHERE ) ) )
index 2729b678a563ef550970bf86418bf958a55cf6d6..de39811e79470afeb8dc8326487c831ce63c9867 100644 (file)
     int i_return = 0;
     playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
                                                        FIND_ANYWHERE );
-    if( p_playlist == NULL || outlineView != o_outline_view )
+    if( p_playlist == NULL )
+        return 0;
+    if( outlineView != o_outline_view )
+    {
+        vlc_object_release( p_playlist );
         return 0;
+    }
 
     if( item == nil )
     {
@@ -752,6 +757,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     {
         playlist_Export( p_playlist, [[o_save_panel filename] fileSystemRepresentation], "export-m3u" );
     }
+    vlc_object_release( p_playlist );
 }
 
 
index 5a6c0fea9b53f22a8275cf3605b2d9d026b16fda..1918e1e128fef8f13dd5c77dbdea59bbc605a220 100644 (file)
@@ -497,8 +497,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
         return;
     }
     
-    p_input = vlc_object_find( p_vout, VLC_OBJECT_INPUT,
-                                                FIND_PARENT );
+    p_input = vlc_object_find( p_vout, VLC_OBJECT_INPUT, FIND_PARENT );
     
     if( p_input == NULL )
     {
@@ -514,7 +513,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     if( o_title == nil )
         o_title = o_mrl;
 
-    vlc_object_release( p_input );
     if( o_mrl != nil )
     {
         if( p_input->input.p_access && !strcmp( p_input->input.p_access->p_module->psz_shortname, "File" ) )
@@ -530,6 +528,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     {
         [self setTitle: [NSString stringWithCString: VOUT_TITLE]];
     }
+    vlc_object_release( p_input );
 }
 
 /* This is actually the same as VLCControls::stop. */
index 3f7fb2a08a980ec898225894ecd4cb5723cda509..61b39c9c805313e89b4c2c8a70d7d5a9a1c3a50a 100644 (file)
@@ -544,7 +544,7 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
 
     CheckAout();
 
-    aout_instance_t *p_aout= (aout_instance_t *)vlc_object_find(p_intf,
+    aout_instance_t *p_aout = (aout_instance_t *)vlc_object_find(p_intf,
                                  VLC_OBJECT_AOUT, FIND_ANYWHERE);
     char *psz_af = NULL;
     if( p_aout )
@@ -552,6 +552,7 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
         psz_af = var_GetString( p_aout, "audio-filter" );
         if( var_GetBool( p_aout, "equalizer-2pass" ) )
             eq_2p_chkbox->SetValue( true );
+       vlc_object_release( p_aout );
     }
     else
     {
index 9494981bbcfab2645d7b44955bc7712614963a86..20e627921b8ef27b5717200a5487cabbfaa6cd95 100644 (file)
@@ -77,16 +77,15 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
         msg_Warn( p_parent, "cannot get sout-keep value" );
         keep.b_bool = VLC_FALSE;
     }
-    else if( keep.b_bool )
+    if( keep.b_bool )
     {
-        msg_Warn( p_parent, "sout-keep true" );
         if( ( p_sout = vlc_object_find( p_parent, VLC_OBJECT_SOUT,
-                                        FIND_ANYWHERE ) ) )
+                                        FIND_ANYWHERE ) ) != NULL )
         {
             if( !strcmp( p_sout->psz_sout, psz_dest ) )
             {
-                msg_Warn( p_parent, "sout keep : reusing sout" );
-                msg_Warn( p_parent, "sout keep : you probably want to use "
+                msg_Dbg( p_parent, "sout keep : reusing sout" );
+                msg_Dbg( p_parent, "sout keep : you probably want to use "
                           "gather stream_out" );
                 vlc_object_detach( p_sout );
                 vlc_object_attach( p_sout, p_parent );
@@ -95,7 +94,8 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
             }
             else
             {
-                msg_Warn( p_parent, "sout keep : destroying unusable sout" );
+                msg_Dbg( p_parent, "sout keep : destroying unusable sout" );
+                vlc_object_release( p_sout );
                 sout_DeleteInstance( p_sout );
             }
         }
@@ -103,9 +103,10 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
     else if( !keep.b_bool )
     {
         while( ( p_sout = vlc_object_find( p_parent, VLC_OBJECT_SOUT,
-                                           FIND_PARENT ) ) )
+                                           FIND_PARENT ) ) != NULL )
         {
-            msg_Warn( p_parent, "sout keep : destroying old sout" );
+            msg_Dbg( p_parent, "sout keep : destroying old sout" );
+            vlc_object_release( p_sout );
             sout_DeleteInstance( p_sout );
         }
     }