Commit af59bbe3 authored by Christophe Massiot's avatar Christophe Massiot

* ALL: releasing a few unreleased objects.

parent 3d9d5739
......@@ -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 );
}
}
......
......@@ -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 ) ) )
......
......@@ -145,8 +145,13 @@
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 );
}
......
......@@ -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. */
......
......@@ -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
{
......
......@@ -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 );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment