[vlc-commits] macosx: properly inform the extension manager about finished inputs
David Fuhrmann
git at videolan.org
Mon Apr 28 11:47:39 CEST 2014
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Mon Apr 28 10:40:49 2014 +0200| [c87e0df3c527d0dd4b5cb36ff9bef1325087e4e9] | committer: David Fuhrmann
macosx: properly inform the extension manager about finished inputs
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c87e0df3c527d0dd4b5cb36ff9bef1325087e4e9
---
modules/gui/macosx/intf.m | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 89e6ebb..005390a 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1258,11 +1258,11 @@ static VLCMain *_o_sharedMainInstance = nil;
// This must be called on main thread
- (void)PlaylistItemChanged
{
- input_thread_t *p_input_changed = nil;
+ input_thread_t *p_input_changed = NULL;
if (p_current_input && (p_current_input->b_dead || !vlc_object_alive(p_current_input))) {
var_DelCallback(p_current_input, "intf-event", InputEvent, [VLCMain sharedInstance]);
- p_input_changed = p_current_input;
+ vlc_object_release(p_current_input);
p_current_input = NULL;
[o_mainmenu setRateControlsEnabled: NO];
@@ -1293,12 +1293,11 @@ static VLCMain *_o_sharedMainInstance = nil;
* and other issues, we need to inform the extension manager on a separate thread.
* The serial queue ensures that changed inputs are propagated in the same order as they arrive.
*/
- if (p_input_changed) {
- dispatch_async(informInputChangedQueue, ^{
- [[ExtensionsManager getInstance:p_intf] inputChanged:p_input_changed];
+ dispatch_async(informInputChangedQueue, ^{
+ [[ExtensionsManager getInstance:p_intf] inputChanged:p_input_changed];
+ if (p_input_changed)
vlc_object_release(p_input_changed);
- });
- }
+ });
}
- (void)updateMainMenu
More information about the vlc-commits
mailing list