[vlc-devel] [PATCH 3/7] gui/qt: use vlc_mutex_locker instead of explicit lock/unlock

Filip Roséen filip at atch.se
Tue Jan 10 13:52:36 CET 2017


---
 modules/gui/qt/components/info_panels.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/components/info_panels.cpp b/modules/gui/qt/components/info_panels.cpp
index ed7d4a6c81..15defe8ac0 100644
--- a/modules/gui/qt/components/info_panels.cpp
+++ b/modules/gui/qt/components/info_panels.cpp
@@ -497,7 +497,8 @@ void InfoPanel::update( input_item_t *p_item)
     QTreeWidgetItem *current_item = NULL;
     QTreeWidgetItem *child_item = NULL;
 
-    vlc_mutex_lock( &p_item->lock );
+    vlc_mutex_locker locker( &p_item->lock );
+
     for( int i = 0; i< p_item->i_categories ; i++)
     {
         current_item = new QTreeWidgetItem();
@@ -516,7 +517,6 @@ void InfoPanel::update( input_item_t *p_item)
         }
         InfoTree->setItemExpanded( current_item, true);
     }
-    vlc_mutex_unlock( &p_item->lock );
 }
 
 /**
-- 
2.11.0



More information about the vlc-devel mailing list