[vlc-commits] Qt: missing locks exporting playlist

Francois Cartegnie git at videolan.org
Sun May 8 16:36:40 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun May  8 16:34:51 2016 +0200| [90d34ab6f8d104d6457a662cd29c0bd00cff1734] | committer: Francois Cartegnie

Qt: missing locks exporting playlist

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

 modules/gui/qt/dialogs_provider.cpp |    2 ++
 modules/gui/qt/recents.cpp          |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/modules/gui/qt/dialogs_provider.cpp b/modules/gui/qt/dialogs_provider.cpp
index 0eade63..83d3487 100644
--- a/modules/gui/qt/dialogs_provider.cpp
+++ b/modules/gui/qt/dialogs_provider.cpp
@@ -681,7 +681,9 @@ void DialogsProvider::saveRecentsToPlaylist()
     }
 
     saveAPlaylist(THEPL, p_node_recents);
+    playlist_Lock(THEPL);
     playlist_NodeDelete(THEPL, p_node_recents, true, false);
+    playlist_Unlock(THEPL);
 }
 
 /****************************************************************************
diff --git a/modules/gui/qt/recents.cpp b/modules/gui/qt/recents.cpp
index c065312..3139adc 100644
--- a/modules/gui/qt/recents.cpp
+++ b/modules/gui/qt/recents.cpp
@@ -158,7 +158,9 @@ void RecentsMRL::save()
 
 playlist_item_t *RecentsMRL::toPlaylist(int length)
 {
+    playlist_Lock(THEPL);
     playlist_item_t *p_node_recent = playlist_NodeCreate(THEPL, _("Recently Played"), THEPL->p_root, PLAYLIST_END, PLAYLIST_RO_FLAG, NULL);
+    playlist_Unlock(THEPL);
 
     if ( p_node_recent == NULL )  return NULL;
 



More information about the vlc-commits mailing list