summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/common/evr/evrcustompresenter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp
index 3afd2342f..49623e891 100644
--- a/src/plugins/common/evr/evrcustompresenter.cpp
+++ b/src/plugins/common/evr/evrcustompresenter.cpp
@@ -842,8 +842,6 @@ HRESULT EVRCustomPresenter::OnClockStart(MFTIME, LONGLONG clockStartOffset)
return hr;
}
- startSurface();
-
// Now try to get new output samples from the mixer.
processOutputLoop();
@@ -891,8 +889,6 @@ HRESULT EVRCustomPresenter::OnClockStop(MFTIME)
cancelFrameStep();
}
- stopSurface();
-
return S_OK;
}
@@ -1400,6 +1396,7 @@ HRESULT EVRCustomPresenter::setMediaType(IMFMediaType *mediaType)
// Clearing the media type is allowed in any state (including shutdown).
if (!mediaType) {
+ stopSurface();
qt_evr_safe_release(&m_mediaType);
releaseResources();
return S_OK;
@@ -1460,6 +1457,8 @@ HRESULT EVRCustomPresenter::setMediaType(IMFMediaType *mediaType)
m_mediaType = mediaType;
m_mediaType->AddRef();
+ startSurface();
+
done:
if (FAILED(hr))
releaseResources();