<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div class=""><p class="">    <strong class="">The problem happens when I close the clients (ffplay) and try to play again after some time (about 1 or 2 minutes).</strong></p><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div>I’m not sure what the problem is here, but I suspect that it may be your client (“ffmpeg”).  “ffmpeg” has a reputation as not having a particularly good RTSP client implementation.</div><div><br class=""></div><div>Instead, I suggest that you first test using our “openRTSP” client application <<a href="http://www.live555.com/openRTSP/" class="">http://www.live555.com/openRTSP/</a>><br class=""><br class=""><blockquote type="cite" class=""><div class=""><p class=""><strong class="">2)</strong> How is the properly way to end the EVENTLOOP.</p><p class="">    I am using th watchVariable to do that ( env->taskScheduler().doEventLoop(&watchVariable); ), but sometimes it does not work an I get the following message from linux:</p><p class="">             <strong class="">Failed to create RTSP server: bind() error (port number: 8554): Address already in use</strong></p><div class=""><br class=""></div><div class=""> <br class="webkit-block-placeholder"></div><p class="">   And after some time the port is released.</p><div class=""><br class=""></div></div></blockquote><br class=""></div><div>This is normal.  The OS waits until the TCP “TIME_WAIT” state has elapsed before it allows you to create another server that uses the same port number.</div><div><br class=""></div><div>If you’re absolutely sure that you will never have more than one “RTSPServer" running at the same time (using the same port number), you can eliminate this delay by defining</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>ALLOW_RTSP_SERVER_PORT_REUSE</div><div>before compiling “RTSPServer.cpp”.</div><br class=""><div apple-content-edited="true" class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  ">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span></span>
</div>
<br class=""></body></html>