Commit 8b1f2d14 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Mac OS X gui: Sanitize vlc object retaining/releasing.

parent fbaa8dc6
...@@ -393,6 +393,7 @@ ...@@ -393,6 +393,7 @@
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-position" ); val.i_int = config_GetInt( p_intf, "key-position" );
var_Set( p_intf, "key-pressed", val ); var_Set( p_intf, "key-pressed", val );
vlc_object_release( (vlc_object_t *)p_vout );
} }
} }
......
...@@ -1353,6 +1353,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1353,6 +1353,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_controls setupVarMenuItem: o_mi_screen target: (vlc_object_t *)p_vout [o_controls setupVarMenuItem: o_mi_screen target: (vlc_object_t *)p_vout
var: "video-device" selector: @selector(toggleVar:)]; var: "video-device" selector: @selector(toggleVar:)];
vlc_object_release( (vlc_object_t *)p_vout );
} }
- (void)setScrollField:(NSString *)o_string stopAfter:(int)timeout - (void)setScrollField:(NSString *)o_string stopAfter:(int)timeout
...@@ -1572,14 +1573,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1572,14 +1573,6 @@ static VLCMain *_o_sharedMainInstance = nil;
p_intf->b_interaction = VLC_FALSE; p_intf->b_interaction = VLC_FALSE;
var_DelCallback( p_intf, "interaction", InteractCallback, self ); var_DelCallback( p_intf, "interaction", InteractCallback, self );
#define p_input p_intf->p_sys->p_input
if( p_input )
{
vlc_object_release( p_input );
p_input = NULL;
}
#undef p_input
/* remove global observer watching for vout device changes correctly */ /* remove global observer watching for vout device changes correctly */
[[NSNotificationCenter defaultCenter] removeObserver: self [[NSNotificationCenter defaultCenter] removeObserver: self
name: NSApplicationDidChangeScreenParametersNotification name: NSApplicationDidChangeScreenParametersNotification
......
...@@ -646,8 +646,6 @@ static VLCsFilters *_o_sharedInstance = nil; ...@@ -646,8 +646,6 @@ static VLCsFilters *_o_sharedInstance = nil;
free( psz_string ); free( psz_string );
vlc_object_release( p_intf );
o_config_changed = YES; o_config_changed = YES;
} }
@end @end
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