diff options
author | David Schulz <david.schulz@digia.com> | 2014-09-25 07:15:25 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@digia.com> | 2014-09-30 09:20:56 +0200 |
commit | b3d88c66be2ba6a6975cd3dd152a40fe429ecb6c (patch) | |
tree | 8b868ee5725a641f6b7fcf401cd754fbee117e01 /src/plugins/wmf | |
parent | b6e1c004142d64a1cb2f83f9928cd2bbadaf0914 (diff) | |
download | qtmultimedia-b3d88c66be2ba6a6975cd3dd152a40fe429ecb6c.tar.gz |
WMF: Fix null ptr derefernce in MFPlayerSession.
Checking the sender of the mediaSourceReady signal to prevent accessing
the incorrect source resolver.
When the source resolver has finished the asynchronous operation and
the source resolver gets recreated in the player at the same time in a
different thread the signal mediaSourceReady still gets emitted from the
old source resolver.
The player assumes that the signal was emitted from the current source
resolver and accesses the unresolved media source in the
handleMediaSourceReady slot.
Task-number: QTBUG-39980
Change-Id: Ic52f6918995aac250048d91f89c520cfea111bd0
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/plugins/wmf')
-rw-r--r-- | src/plugins/wmf/player/mfplayersession.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp index 0de0bdfd8..2d4f46b1d 100644 --- a/src/plugins/wmf/player/mfplayersession.cpp +++ b/src/plugins/wmf/player/mfplayersession.cpp @@ -250,7 +250,7 @@ void MFPlayerSession::handleSourceError(long hr) void MFPlayerSession::handleMediaSourceReady() { - if (QMediaPlayer::LoadingMedia != m_status || !m_sourceResolver) + if (QMediaPlayer::LoadingMedia != m_status || !m_sourceResolver || m_sourceResolver != sender()) return; #ifdef DEBUG_MEDIAFOUNDATION qDebug() << "handleMediaSourceReady"; |