summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/ds9/backend.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-24 15:33:53 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-24 15:35:41 (GMT)
commit5ee3c7a120477668904502a997d88d0c5a0fd976 (patch)
treedb363af27031fd719215c382e115b6272089c4c6 /src/3rdparty/phonon/ds9/backend.cpp
parentcf354eb2bb24de1076f126c526317ac7e1d9ac4d (diff)
downloadQt-5ee3c7a120477668904502a997d88d0c5a0fd976.zip
Qt-5ee3c7a120477668904502a997d88d0c5a0fd976.tar.gz
Qt-5ee3c7a120477668904502a997d88d0c5a0fd976.tar.bz2
Phonon/ds9: fix a potential dead-lock found by user
This is following merge request 878. A customer was able to get a dead- lock when calling at the same time RenderFile and enumerating the audio devices. We now have a global mutex for that.
Diffstat (limited to 'src/3rdparty/phonon/ds9/backend.cpp')
-rw-r--r--src/3rdparty/phonon/ds9/backend.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp
index 6007020..6ed0145 100644
--- a/src/3rdparty/phonon/ds9/backend.cpp
+++ b/src/3rdparty/phonon/ds9/backend.cpp
@@ -64,6 +64,11 @@ namespace Phonon
::CoUninitialize();
}
+ QMutex *Backend::directShowMutex()
+ {
+ return &qobject_cast<Backend*>(qt_plugin_instance())->m_directShowMutex;
+ }
+
QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
{
switch (c)
@@ -131,6 +136,7 @@ namespace Phonon
QList<int> Backend::objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const
{
+ QMutexLocker locker(&m_directShowMutex);
QList<int> ret;
switch(type)
@@ -204,6 +210,7 @@ namespace Phonon
QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const
{
+ QMutexLocker locker(&m_directShowMutex);
QHash<QByteArray, QVariant> ret;
switch (type)
{