From 841460febe43063da115a65a2bf13556a9964435 Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Mon, 19 Jan 2015 11:22:50 +0100 Subject: [PATCH] libvlc: media: lock media_list MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Denis-Courmont --- lib/media.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/media.c b/lib/media.c index f65d405493..c73c5b1859 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.39.2