[vlc-devel] commit: libvlc: Make sure we remove object observers in media_discoverer. ( Pierre d'Herbemont )
git version control
git at videolan.org
Thu Dec 17 02:44:24 CET 2009
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Wed Dec 16 20:29:53 2009 +0100| [2d69f76b7a9731eeb86e4d8da4af77b6a8988234] | committer: Pierre d'Herbemont
libvlc: Make sure we remove object observers in media_discoverer.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d69f76b7a9731eeb86e4d8da4af77b6a8988234
---
src/control/media_discoverer.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/control/media_discoverer.c b/src/control/media_discoverer.c
index 8ff7c6a..9d887e6 100644
--- a/src/control/media_discoverer.c
+++ b/src/control/media_discoverer.c
@@ -247,7 +247,25 @@ libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis )
{
int i;
+ vlc_event_detach( services_discovery_EventManager( p_mdis->p_sd ),
+ vlc_ServicesDiscoveryItemAdded,
+ services_discovery_item_added,
+ p_mdis );
+ vlc_event_detach( services_discovery_EventManager( p_mdis->p_sd ),
+ vlc_ServicesDiscoveryItemRemoved,
+ services_discovery_item_removed,
+ p_mdis );
+ vlc_event_detach( services_discovery_EventManager( p_mdis->p_sd ),
+ vlc_ServicesDiscoveryStarted,
+ services_discovery_started,
+ p_mdis );
+ vlc_event_detach( services_discovery_EventManager( p_mdis->p_sd ),
+ vlc_ServicesDiscoveryEnded,
+ services_discovery_ended,
+ p_mdis );
+
libvlc_media_list_release( p_mdis->p_mlist );
+
vlc_sd_StopAndDestroy( p_mdis->p_sd );
/* Free catname_to_submedialist and all the mlist */
More information about the vlc-devel
mailing list