summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/player
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-10-31 19:28:23 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-11-04 15:04:21 +0000
commit556fa071219cb26f79bc40a641aeb3be05846b27 (patch)
treede58acac2864b1b81a7084e0a9f8234585036774 /src/plugins/directshow/player
parent4c189b18c3c976775658c59ae576c717634fd3f2 (diff)
DirectShow: clear current video frame when stopping.
Change-Id: I063d8a1b95f3d751f55dfce7fa2cb749177dc906 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/plugins/directshow/player')
-rw-r--r--src/plugins/directshow/player/videosurfacefilter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/directshow/player/videosurfacefilter.cpp b/src/plugins/directshow/player/videosurfacefilter.cpp
index 51151b16c..901d2e908 100644
--- a/src/plugins/directshow/player/videosurfacefilter.cpp
+++ b/src/plugins/directshow/player/videosurfacefilter.cpp
@@ -147,6 +147,14 @@ HRESULT VideoSurfaceFilter::Stop()
m_sampleScheduler.stop();
+ if (thread() == QThread::currentThread()) {
+ flush();
+ } else {
+ QMutexLocker locker(&m_mutex);
+ m_loop->postEvent(this, new QEvent(QEvent::Type(FlushSurface)));
+ m_wait.wait(&m_mutex);
+ }
+
return S_OK;
}