<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,<br>
</p>
<p>I have been trying to build a RTSP server using gst-rtsp-server. I now want to be able to close an active connection from the server side. However, if I call gst_rtsp_client_close() I get some undefined behaviors.<br>
</p>
<p>Most of the time I can see a debug log: <br>
</p>
<div>GLib-CRITICAL **: g_main_context_unref: assertion 'g_atomic_int_get (&context->ref_count) > 0' fai<span style="font-size: 12pt;">led</span><span style="font-size: 12pt;">​</span></div>
<div>and the application becomes unresponsive.<br>
</div>
<div>Some times I get a coredump when the client tries to reconnect.<br>
</div>
<div><br>
</div>
<div>I have modified the test-uri example to trigger the issue:<br>
</div>
<div><a href="https://gist.github.com/RHammar/162c36ea328bb46fb7d30e3ef5ec1f2d">https://gist.github.com/RHammar/162c36ea328bb46fb7d30e3ef5ec1f2d</a><br>
</div>
<p><br>
</p>
<p>It will setup the rtsp server to accept a connection and then call gst_rtsp_client_close() after 2 seconds.<br>
</p>
<p><br>
</p>
<p>Regards,<br>
</p>
<p>Rickard<br>
</p>
</body>
</html>