[vlc-devel] commit: Qt4: add mutex-lockin when accessing selector-names (Ilkka Ollakka )

git version control git at videolan.org
Thu Aug 13 15:14:20 CEST 2009


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Aug 13 16:10:12 2009 +0300| [96b97b1612e584d4e0c24a884c1333f2e52abe8a] | committer: Ilkka Ollakka 

Qt4: add mutex-lockin when accessing selector-names

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

 .../gui/qt4/components/playlist/playlist_model.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index c6fc9a4..d60c078 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -322,7 +322,12 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const
         int metadata = 1;
 
         if( item->model->i_depth == DEPTH_SEL )
-            return QVariant( QString( qfu( item->p_input->psz_name ) ) );
+        {
+            vlc_mutex_lock( &item->p_input->lock );
+            QString returninfo = QString( qfu( item->p_input->psz_name ) );
+            vlc_mutex_unlock( &item->p_input->lock );
+            return QVariant(returninfo);
+        }
 
         while( metadata < COLUMN_END )
         {




More information about the vlc-devel mailing list