diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-12 06:51:32 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-12 06:51:32 (GMT) |
commit | 9bca64fc5eee598f97eba1052f1db250c5c7e43b (patch) | |
tree | d50a4a16ba5ce18447b17dc9b4656a9e74c1090e /src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp | |
parent | 476970c2a1d00cfbf3f8bd6ac4b5c835633641ca (diff) | |
download | Qt-9bca64fc5eee598f97eba1052f1db250c5c7e43b.zip Qt-9bca64fc5eee598f97eba1052f1db250c5c7e43b.tar.gz Qt-9bca64fc5eee598f97eba1052f1db250c5c7e43b.tar.bz2 |
Fix corruption of Direct Show event queue.
The mutex proctecting the queue was being released and reacquired
between when the head and tail are cleared, making it possible to append
a new item to a popped, or even deleted tail, resulting in a lost event.
Diffstat (limited to 'src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp')
-rw-r--r-- | src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp index 4f9a19d..07541c2 100644 --- a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp +++ b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp @@ -148,13 +148,14 @@ void DirectShowEventLoop::processEvents() DirectShowPostedEvent *post = m_postsHead; m_postsHead = m_postsHead->next; + if (!m_postsHead) + m_postsTail = 0; + locker.unlock(); QCoreApplication::sendEvent(post->receiver, post->event); delete post; locker.relock(); } - - m_postsTail = 0; } QT_END_NAMESPACE |