<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hello,<br><br>I have a Flask application running on Gunicorn that creates a new GStreamer pipeline on a Start() API request (and sets the pipeline to NULL on a stop() request)<br><br>The GStreamer pipeline operations are encapsulated in a class, and a new instance of the class is created for each Start API invocation, and its reference is deleted on the stop() API invocation.<br><br>The basic flow is as such - <br><br>Start API - <br>* Initialize class<br>* GObject.threads_init(), Gst.init() (and other members)<br>* Create new Gst.Pipeline, Gst.Elements, and set pipeline to PLAYING<br><br>Stop API - <br>* Send Gst.Event.EOS to the pipeline<br>* Set Gst.Pipeline to Gst.State.NULL<br><br>I have noticed that with repeated start/stop invocations, the process has a lot of orphan gstreamer threads. I have tried to unref the pipeline, but then I get strange segmentation faults in other parts of my application.<br><br>Does anyone have any pointers as to what I can try here? The python tutorials don't do any explicit de-initialization steps.<br><br>Thanks,<br>Vineet<br></div></div>