<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi all,<div>this is my code to close a pipeline:</div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">        <span style="color: #bb2ca2">if</span>(<span style="color: #4f8187">pPipeline</span>!=<span style="color: #bb2ca2">NULL</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">        {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #000000">            </span>gst_element_set_state<span style="color: #000000">(</span><span style="color: #4f8187">pPipeline</span><span style="color: #000000">, </span>GST_STATE_NULL<span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #000000">            </span>gst_object_unref<span style="color: #000000">(</span><span style="color: #4f8187">pPipeline</span><span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">            <span style="color: #4f8187">pPipeline</span> = <span style="color: #bb2ca2">NULL</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">        }</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px;">I noticed the pipeline is closed correctly but I need to wait for the pipeline destruction. Which is the best way to do that?</div><div style="margin: 0px;">Thanks</div><div style="margin: 0px;">Elio</div></body></html>