[vlmc-devel] MetaDataManager: Fix missing mutex initialization

Hugo Beauzée-Luyssen git at videolan.org
Mon Feb 24 20:09:38 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 24 00:19:44 2014 +0200| [cb2cf06ea30a9524250994f6bc08d7128cda8e15] | committer: Hugo Beauzée-Luyssen

MetaDataManager: Fix missing mutex initialization

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=cb2cf06ea30a9524250994f6bc08d7128cda8e15
---

 src/Metadata/MetaDataManager.cpp |    4 ++--
 src/Metadata/MetaDataManager.h   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Metadata/MetaDataManager.cpp b/src/Metadata/MetaDataManager.cpp
index 246f9e7..1cff78a 100644
--- a/src/Metadata/MetaDataManager.cpp
+++ b/src/Metadata/MetaDataManager.cpp
@@ -38,7 +38,7 @@ MetaDataManager::~MetaDataManager()
 void
 MetaDataManager::computeMediaMetadata( Media *media )
 {
-    QMutexLocker lock( m_computingMutex );
+    QMutexLocker lock( &m_computingMutex );
     m_mediaToCompute.enqueue( media );
     if ( m_computeInProgress == false )
         start();
@@ -52,7 +52,7 @@ MetaDataManager::run()
     {
         Media*  target;
         {
-            QMutexLocker    lock( m_computingMutex );
+            QMutexLocker    lock( &m_computingMutex );
             if ( m_mediaToCompute.isEmpty() == true )
             {
                 m_computeInProgress = false;
diff --git a/src/Metadata/MetaDataManager.h b/src/Metadata/MetaDataManager.h
index c8b15b9..6f19e90 100644
--- a/src/Metadata/MetaDataManager.h
+++ b/src/Metadata/MetaDataManager.h
@@ -27,8 +27,8 @@
 
 #include <QThread>
 #include <QQueue>
+#include <QMutex>
 
-class   QMutex;
 class   Media;
 namespace LibVLCpp
 {
@@ -50,7 +50,7 @@ class MetaDataManager : public QThread, public Singleton<MetaDataManager>
         virtual void            run();
 
     private:
-        QMutex                  *m_computingMutex;
+        QMutex                  m_computingMutex;
         QQueue<Media*>          m_mediaToCompute;
         bool                    m_computeInProgress;
         LibVLCpp::MediaPlayer   *m_mediaPlayer;



More information about the Vlmc-devel mailing list