diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-09-06 12:11:36 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-10-01 09:23:41 +0200 |
commit | 8351c569af51562d8b5e1d0de0b35c42e95b79b5 (patch) | |
tree | 166315b68589d2bb49a4805ed8d2ecf3fd86aa58 /src/qtmultimediaquicktools | |
parent | 545959e45ec86c70617f4839d20d931297c30c20 (diff) |
Fix leaking QVideoFilterRunnable when window is closed
When QDeclarativeVideoOutput::releaseResources() is called,
means the window is going to be destroyed and it is too late to use
scheduleRenderJob() to clear filters.
This beforeSynchronizingJobs will not be handled in this case.
Which produces a leak of filter's runnable.
Fixes: QTBUG-51588
Change-Id: I71ec351463a2c4136d8b7e241d61e628a1b0c64b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp index 40568d118..863cefa4e 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp @@ -163,8 +163,7 @@ void QDeclarativeVideoRendererBackend::scheduleDeleteFilterResources() void QDeclarativeVideoRendererBackend::releaseResources() { // Called on the gui thread when the window is closed or changed. - QMutexLocker lock(&m_frameMutex); - scheduleDeleteFilterResources(); + invalidateSceneGraph(); } void QDeclarativeVideoRendererBackend::invalidateSceneGraph() |