Commit cda94f73 authored by David Schulz's avatar David Schulz Committed by Yoann Lopes
Browse files

WMF: Use media source only when it is initialized.


Change-Id: I0efcf6139d0b81194cf25383025f080f8656728c
Reviewed-by: default avatarYoann Lopes <yoann.lopes@digia.com>
Showing with 6 additions and 5 deletions
...@@ -256,8 +256,13 @@ void MFPlayerSession::handleMediaSourceReady() ...@@ -256,8 +256,13 @@ void MFPlayerSession::handleMediaSourceReady()
qDebug() << "handleMediaSourceReady"; qDebug() << "handleMediaSourceReady";
#endif #endif
HRESULT hr = S_OK; HRESULT hr = S_OK;
IMFPresentationDescriptor* sourcePD;
IMFMediaSource* mediaSource = m_sourceResolver->mediaSource(); IMFMediaSource* mediaSource = m_sourceResolver->mediaSource();
DWORD dwCharacteristics = 0;
mediaSource->GetCharacteristics(&dwCharacteristics);
emit seekableUpdate(MFMEDIASOURCE_CAN_SEEK & dwCharacteristics);
IMFPresentationDescriptor* sourcePD;
hr = mediaSource->CreatePresentationDescriptor(&sourcePD); hr = mediaSource->CreatePresentationDescriptor(&sourcePD);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
m_duration = 0; m_duration = 0;
...@@ -1638,10 +1643,6 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent) ...@@ -1638,10 +1643,6 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
} }
} }
DWORD dwCharacteristics = 0;
m_sourceResolver->mediaSource()->GetCharacteristics(&dwCharacteristics);
emit seekableUpdate(MFMEDIASOURCE_CAN_SEEK & dwCharacteristics);
// Topology is resolved and successfuly set, this happens only after loading a new media. // Topology is resolved and successfuly set, this happens only after loading a new media.
// Make sure we always start the media from the beginning // Make sure we always start the media from the beginning
m_varStart.vt = VT_I8; m_varStart.vt = VT_I8;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment