[vlc-commits] lib: media_discoverer: stop after sending events

Thomas Guillem git at videolan.org
Mon Jun 13 13:26:30 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jun 13 13:23:47 2016 +0200| [94a21935899952926a76a40029130213ee3b7d09] | committer: Thomas Guillem

lib: media_discoverer: stop after sending events

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=94a21935899952926a76a40029130213ee3b7d09
---

 lib/media_discoverer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/media_discoverer.c b/lib/media_discoverer.c
index 93295fd..d637189 100644
--- a/lib/media_discoverer.c
+++ b/lib/media_discoverer.c
@@ -234,8 +234,6 @@ libvlc_media_discoverer_start( libvlc_media_discoverer_t * p_mdis )
 LIBVLC_API void
 libvlc_media_discoverer_stop( libvlc_media_discoverer_t * p_mdis )
 {
-    vlc_sd_Stop( p_mdis->p_sd );
-
     p_mdis->running = false;
 
     libvlc_media_list_t * p_mlist = p_mdis->p_mlist;
@@ -246,6 +244,8 @@ libvlc_media_discoverer_stop( libvlc_media_discoverer_t * p_mdis )
     libvlc_event_t event;
     event.type = libvlc_MediaDiscovererEnded;
     libvlc_event_send( p_mdis->p_event_manager, &event );
+
+    vlc_sd_Stop( p_mdis->p_sd );
 }
 
 /**************************************************************************



More information about the vlc-commits mailing list