<div dir="ltr"><div>Hello,</div><div><br></div><div>It is necessary to set the pipeline state to NULL before destroying it, it is an API requirement.</div><div><br></div><div>- Thibault<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 26, 2021 at 10:24 AM Nick_law <<a href="mailto:nicholas@umantec.net">nicholas@umantec.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Afternoon,<br>
<br>
I have run into an issue with gstreamer hanging during:<br>
<br>
gst_element_set_state(pipeline, GST_STATE_NULL);<br>
<br>
I am pretty sure this is due to another process having the filesink location<br>
still open as a fifo.<br>
We use gstreamer to write to a previously created fifo and have found that<br>
if other processes still have the fifo open then when trying to destruct and<br>
unref the pipeline, it hangs.<br>
<br>
        if (pipeline != nullptr) {<br>
                gst_element_set_state(pipeline, GST_STATE_NULL);<br>
                gst_object_unref(pipeline);<br>
        }<br>
<br>
If I just remove the gst_element_set_state(pipeline, GST_STATE_NULL); <br>
and only call<br>
gst_object_unref(pipeline);<br>
<br>
it doesn't hang and seems to be able to deconstruct and start up new<br>
pipelines without issue.<br>
<br>
but every tutorial I read and example code, always sets the element state to<br>
GST_STATE_NULL before unref.<br>
<br>
So I'm wondering why and if it's even necessary?<br>
<br>
Kind regards<br>
Nick<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>