[vlc-devel] [PATCH 08/12] libvlc: media: lock media_list

Thomas Guillem thomas at gllm.fr
Mon Jan 19 11:22:50 CET 2015


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

diff --git a/lib/media.c b/lib/media.c
index f65d405..c73c5b1 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_internal_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