[vlc-devel] commit: services_discovery: playlist_NodesPairCreate needs a lock. ( Pierre d'Herbemont )

git version control git at videolan.org
Tue Jul 15 13:19:22 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Jul 15 13:07:23 2008 +0200| [115d0547f7176a77a18564e0f901e4734becba80]

services_discovery: playlist_NodesPairCreate needs a lock.

Should fix #1708 (Adding a folder in the Mac OS X VLC *media library* result in an assertion failure). Thanks to upcoming commit "playlist: Use PL_ASSERT_LOCKED where the playlist lock should be held.".

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

 src/playlist/services_discovery.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c
index a085352..84b4dd9 100644
--- a/src/playlist/services_discovery.c
+++ b/src/playlist/services_discovery.c
@@ -306,8 +306,10 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist,  const char *psz_modu
 
         char * psz = services_discovery_GetLocalizedName( p_sd );
         assert( psz );
+        PL_LOCK;
         playlist_NodesPairCreate( p_playlist, psz,
                 &p_cat, &p_one, false );
+        PL_UNLOCK;
         free( psz );
 
         vlc_event_attach( services_discovery_EventManager( p_sd ),




More information about the vlc-devel mailing list