diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-31 19:28:23 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-11-04 15:04:21 +0000 |
commit | 556fa071219cb26f79bc40a641aeb3be05846b27 (patch) | |
tree | de58acac2864b1b81a7084e0a9f8234585036774 /src | |
parent | 4c189b18c3c976775658c59ae576c717634fd3f2 (diff) |
DirectShow: clear current video frame when stopping.
Change-Id: I063d8a1b95f3d751f55dfce7fa2cb749177dc906
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/directshow/player/videosurfacefilter.cpp | 8 |
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; } |