aboutsummaryrefslogtreecommitdiffstats
path: root/src/GSTInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GSTInput.cpp')
-rw-r--r--src/GSTInput.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GSTInput.cpp b/src/GSTInput.cpp
index 6c437d7..af27db1 100644
--- a/src/GSTInput.cpp
+++ b/src/GSTInput.cpp
@@ -300,6 +300,10 @@ void GSTInput::process()
GSTInput::~GSTInput()
{
+ if (m_gst_data.pipeline) {
+ gst_element_set_state(m_gst_data.pipeline, GST_STATE_NULL);
+ }
+
m_running = false;
// Ensures push() doesn't get blocked
@@ -314,7 +318,6 @@ GSTInput::~GSTInput()
}
if (m_gst_data.pipeline) {
- gst_element_set_state(m_gst_data.pipeline, GST_STATE_NULL);
gst_object_unref(m_gst_data.pipeline);
}
}