diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-21 14:19:58 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-21 14:22:06 (GMT) |
commit | 71a8a5c97315c114d55190594a7175552bfd41a6 (patch) | |
tree | 6d3a238bc89cdbc3d02dee6a75fc9172e7a39935 /src/3rdparty/phonon/ds9/qmeminputpin.cpp | |
parent | 2fbd7208c273404030b9327dd3e2fbcf6aa4491f (diff) | |
download | Qt-71a8a5c97315c114d55190594a7175552bfd41a6.zip Qt-71a8a5c97315c114d55190594a7175552bfd41a6.tar.gz Qt-71a8a5c97315c114d55190594a7175552bfd41a6.tar.bz2 |
Phonon on windows: fixeda possible dead-lock when using QFile
the msdn was not correct and IAsyncReader::WaitForNext should not
return an error when the pin is currently flushing.
I took the opportunity to clean the way the mutex is locked on the
pin.
Task-number: 258830
Diffstat (limited to 'src/3rdparty/phonon/ds9/qmeminputpin.cpp')
-rw-r--r-- | src/3rdparty/phonon/ds9/qmeminputpin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp index 865b8af..630cfb4 100644 --- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp +++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp @@ -84,7 +84,7 @@ namespace Phonon conn->BeginFlush(); } } - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = true; return S_OK; } @@ -98,7 +98,7 @@ namespace Phonon conn->EndFlush(); } } - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = false; return S_OK; } @@ -152,7 +152,7 @@ namespace Phonon } { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_shouldDuplicateSamples = m_transform && readonly; } @@ -266,19 +266,19 @@ namespace Phonon void QMemInputPin::addOutput(QPin *output) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_outputs += output; } void QMemInputPin::removeOutput(QPin *output) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_outputs.removeOne(output); } QList<QPin*> QMemInputPin::outputs() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_outputs; } |