WMF: Use media source only when it is initialized.
Change-Id: I0efcf6139d0b81194cf25383025f080f8656728c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
committed by
Yoann Lopes
parent
b3d88c66be
commit
cda94f73a3
@@ -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)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user