<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I’m following the explanation about dynamically changing pipelines found here:</div><div class=""><a href="https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html?gi-language=c#dynamically-changing-the-pipeline" class="">https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html?gi-language=c#dynamically-changing-the-pipeline</a></div><div class=""><br class=""></div><div class="">However, when I run my program and the EOS event callback is called, I get the following error:</div><div class=""><br class=""></div><div class="">```</div><div class=""><div class="">Trying to join task 0x7fa51f928dd0 from its thread would deadlock.</div><div class="">You cannot change the state of an element from its streaming</div><div class="">thread. Use g_idle_add() or post a GstMessage on the bus to</div><div class="">schedule the state change from the main thread.</div></div><div class="">```</div><div class=""><br class=""></div><div class="">The reason seems simple. I’m listening for an EOS event on the src pad of the element I want to remove.. (As explained in the demo code).</div><div class=""><br class=""></div><div class="">Now I’m wondering if I am doing something wrong or if perhaps the example code might not be up to data anymore?</div><div class=""><br class=""></div><div class="">In any case, what is the best practice to remove an element from a (theoretically running) pipeline?</div><div class=""><br class=""></div><div class="">Thank you!</div><div class="">Maurice</div></body></html>