summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/QuickStreamer/item.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/QuickStreamer/item.cpp b/src/QuickStreamer/item.cpp
index a521241..b6aec20 100644
--- a/src/QuickStreamer/item.cpp
+++ b/src/QuickStreamer/item.cpp
@@ -876,6 +876,11 @@ Item::Item(const Item &other)
Item::~Item()
{
+ if (GST_IS_ELEMENT(m_target))
+ gst_element_set_state(GST_ELEMENT(m_target), GST_STATE_NULL);
+
+ g_signal_handlers_disconnect_matched(m_target, static_cast<GSignalMatchType>(0),
+ 0, 0, Q_NULLPTR, Q_NULLPTR, Q_NULLPTR);
g_object_unref(m_target);
}