diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-09-13 15:12:49 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-09-13 15:12:49 +0200 |
commit | 5f6eacd1e3029cc2c925c7b43744ae903db71976 (patch) | |
tree | 2e762239401290182a484771c1e117dafdb8ec21 /src/GSTInput.cpp | |
parent | 4cf48cce116192b5bcdf0656c026f6403026f88e (diff) | |
download | ODR-AudioEnc-5f6eacd1e3029cc2c925c7b43744ae903db71976.tar.gz ODR-AudioEnc-5f6eacd1e3029cc2c925c7b43744ae903db71976.tar.bz2 ODR-AudioEnc-5f6eacd1e3029cc2c925c7b43744ae903db71976.zip |
Set GST pipeline to NULL state earlier in teardown
Diffstat (limited to 'src/GSTInput.cpp')
-rw-r--r-- | src/GSTInput.cpp | 5 |
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); } } |