[vlc-commits] libvlc: media: lock media_list

Thomas Guillem git at videolan.org
Tue Jan 20 07:18:47 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jan 19 11:22:50 2015 +0100| [841460febe43063da115a65a2bf13556a9964435] | committer: Rémi Denis-Courmont

libvlc: media: lock media_list

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 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;



More information about the vlc-commits mailing list