summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2018-07-09 09:39:28 +0200
committerPeter Seiderer <ps.report@gmx.net>2018-07-25 15:43:03 +0000
commit5488653cf82ad4ed94be4167a6281356b678928d (patch)
treead824838b20947476aaebdb29e5fbb6f7df6e599
parent448c992972d4078af1eee7ad9ccc8d86c0f2e78d (diff)
downloadqtmultimedia-5488653cf82ad4ed94be4167a6281356b678928d.tar.gz
Gstreamer: Use gst_bus_remove_watch() instead of g_source_remove()
Avoids critcial warning ('GLib-CRITICAL **: Source ID 10 was not found when attempting to remove it') in case the applications initiates another glib context/main loop. The new gst_bus_remove_watch() is available since gstreamer API 1.6, otherwise fall back to g_source_remove(). Task-number: QTBUG-69468 Change-Id: I4343865cb41a2d62ac4b0c0c04f60f13727f56d0 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
-rw-r--r--src/gsttools/qgstreamerbushelper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gsttools/qgstreamerbushelper.cpp b/src/gsttools/qgstreamerbushelper.cpp
index bad1d210a..5df046fde 100644
--- a/src/gsttools/qgstreamerbushelper.cpp
+++ b/src/gsttools/qgstreamerbushelper.cpp
@@ -79,7 +79,11 @@ public:
delete m_intervalTimer;
if (m_tag)
+#if GST_CHECK_VERSION(1, 6, 0)
+ gst_bus_remove_watch(m_bus);
+#else
g_source_remove(m_tag);
+#endif
}
GstBus* bus() const { return m_bus; }