[vlc-devel] [PATCH 1/2] libvlc: media: lock media_list

Thomas Guillem thomas at gllm.fr
Fri Jan 16 18:36:19 CET 2015


---
 lib/media.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/media.c b/lib/media.c
index f78a1bf..c6d2d56 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -141,7 +141,11 @@ static void input_item_subitem_added( const vlc_event_t *p_event,
     /* Add this to our media list */
     p_subitems = media_get_subitems( p_md );
     if( p_subitems != NULL )
+    {
+        libvlc_media_list_lock( p_subitems );
         _libvlc_media_list_add_media( p_subitems, p_md_child );
+        libvlc_media_list_unlock( p_subitems );
+    }
 
     /* Construct the event */
     event.type = libvlc_MediaSubItemAdded;
-- 
2.1.3




More information about the vlc-devel mailing list