[vlc-devel] commit: playlist: Be a good citizen and kill the thread before releasing fetcher and parser. (Pierre d'Herbemont )

git version control git at videolan.org
Wed Jul 9 23:18:44 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Wed Jul  9 23:18:07 2008 +0200| [deee3a23527cd19beeba232358cb678a6a5c8a17]

playlist: Be a good citizen and kill the thread before releasing fetcher and parser.

Note, this kills a non-letal warning from libvlccore.

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

 src/playlist/engine.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 90b5526..45b95cc 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -169,11 +169,18 @@ static void playlist_Destructor( vlc_object_t * p_this )
     playlist_t * p_playlist = (playlist_t *)p_this;
 
     if( p_playlist->p_preparse )
+    {
+        vlc_object_kill( p_playlist->p_preparse );
+        vlc_thread_join( p_playlist->p_preparse );
         vlc_object_release( p_playlist->p_preparse );
+    }
 
     if( p_playlist->p_fetcher )
+    {
+        vlc_object_kill( p_playlist->p_fetcher );
+        vlc_thread_join( p_playlist->p_fetcher );
         vlc_object_release( p_playlist->p_fetcher );
-
+    }
     msg_Dbg( p_this, "Destroyed" );
 }
 




More information about the vlc-devel mailing list