From 5488653cf82ad4ed94be4167a6281356b678928d Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Mon, 9 Jul 2018 09:39:28 +0200 Subject: 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 --- src/gsttools/qgstreamerbushelper.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.1