WMF: Fixed shutdown sequence.
A wrong shutdown sequence was causing a wait condition to never be met, resulting in a 5 seconds hang on shutdown. Also reduced the wait condition timeout to 100 ms. Task-number: QTBUG-28432 Change-Id: Ib415bf66634603d839be3e34e497e3a3c5a19ad9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Jason Barron <jason@cutehacks.com>
This commit is contained in:
committed by
The Qt Project
parent
31fdbb1c22
commit
ad83534736
@@ -71,6 +71,8 @@ MFPlayerService::MFPlayerService(QObject *parent)
|
||||
|
||||
MFPlayerService::~MFPlayerService()
|
||||
{
|
||||
m_session->close();
|
||||
|
||||
#ifndef Q_WS_SIMULATOR
|
||||
if (m_videoWindowControl)
|
||||
delete m_videoWindowControl;
|
||||
@@ -79,7 +81,6 @@ MFPlayerService::~MFPlayerService()
|
||||
if (m_videoRendererControl)
|
||||
delete m_videoRendererControl;
|
||||
|
||||
m_session->close();
|
||||
m_session->Release();
|
||||
}
|
||||
|
||||
|
||||
@@ -454,7 +454,7 @@ void MFPlayerSession::close()
|
||||
if (m_session) {
|
||||
hr = m_session->Close();
|
||||
if (SUCCEEDED(hr)) {
|
||||
DWORD dwWaitResult = WaitForSingleObject(m_hCloseEvent, 5000);
|
||||
DWORD dwWaitResult = WaitForSingleObject(m_hCloseEvent, 100);
|
||||
if (dwWaitResult == WAIT_TIMEOUT) {
|
||||
qWarning() << "session close time out!";
|
||||
}
|
||||
|
||||
@@ -92,8 +92,8 @@ QMediaService* WMFServicePlugin::create(QString const& key)
|
||||
|
||||
void WMFServicePlugin::release(QMediaService *service)
|
||||
{
|
||||
releaseRefCount();
|
||||
delete service;
|
||||
releaseRefCount();
|
||||
}
|
||||
|
||||
QMediaServiceProviderHint::Features WMFServicePlugin::supportedFeatures(
|
||||
|
||||
Reference in New Issue
Block a user