summaryrefslogtreecommitdiffstats
path: root/src/gsttools
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-05-20 12:49:28 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-05-21 12:25:31 +0000
commit7a4478a4a411df9f21e1499d2301049f9045b7d6 (patch)
treea4388af1f7ad80631f80c1c01530254680b8192c /src/gsttools
parent2508aa870167e86fa7e71e982388d5265f11fad1 (diff)
GStreamer: Fix crash when the bus helper is destroyed
Called deleteLater() on the bus helper to ensure the cleanup is handled gracefully. QGstreamerBusHelperPrivate::doProcessMessage is called on a message from gst, which it calls QGstreamerPlayerSession::processBusMessage where new media is set and current helper object is destroyed. When for loop is ended in doProcessMessage, current object is freed and produces a crash. Change-Id: Ic9cde97c284406450d4723f1f7f71fa1ea2c0648 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/gsttools')
-rw-r--r--src/gsttools/qgstreamerplayersession.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp
index bd28afb91..5c9eebca2 100644
--- a/src/gsttools/qgstreamerplayersession.cpp
+++ b/src/gsttools/qgstreamerplayersession.cpp
@@ -407,7 +407,7 @@ bool QGstreamerPlayerSession::setPipeline(GstElement *pipeline)
m_pipeline = pipeline;
gst_object_unref(GST_OBJECT(m_bus));
m_bus = bus;
- delete m_busHelper;
+ m_busHelper->deleteLater();
m_busHelper = new QGstreamerBusHelper(m_bus, this);
m_busHelper->installMessageFilter(this);