<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><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;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="xam_msg_class"><div style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 12.7272720336914px; line-height: normal; font-family: Arial;" class=""><p style="margin-top: 0px; padding: 0px; border: 0px; font-size: 13.6000003814697px; vertical-align: baseline; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 17.8048000335693px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">any client for each camera runs in a separate thread</p></div></div></div></blockquote><div class="">Note that you don't need to do this.  Instead, it is possible (and, in fact, much easier) to have multiple RTSP clients running in a single thread, using a single event loop.  Note how the "testRTSPClient" code does this.</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="xam_msg_class"><div style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 12.7272720336914px; line-height: normal; font-family: Arial;" class=""><p style="margin-top: 0px; padding: 0px; border: 0px; font-size: 13.6000003814697px; vertical-align: baseline; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 17.8048000335693px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">Valgrind tells me that memory leaks (or something else that lost bytes) are found: 60 bytes direct, 20.000 indirect bytes are lost in the thread,</p><p style="margin-top: 0px; padding: 0px; border: 0px; font-size: 13.6000003814697px; vertical-align: baseline; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 17.8048000335693px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class=""> in the H264BufferdPackedFactory::createNewPacket(...) by ReorederingPacketBuffer::getFreePacket() by SocketDescriptor::tcpReadHandler() by BasicTaskScheduler::singleStep().</p><p style="margin-top: 0px; padding: 0px; border: 0px; font-size: 13.6000003814697px; vertical-align: baseline; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 17.8048000335693px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">I'm going crazy. Why this behaviour in this case?</p></div></div></div></blockquote><div class=""><br class=""></div>I don't know, but I wouldn't pay too much attention to the details in "valgrind" reports; they're notoriously unreliable.</div><div class=""><br class=""></div><div class="">But in any case I suggest reimplementing your application as a single-threaded application (as noted above).  Not only will it be simpler, but it'll be easier to debug.</div><div class=""><br class=""></div><div class="">(Alternatively, if your clients are truly independent, then you should also consider running each client as a separate *process* (i.e., as a separate running instance of an application).)</div><br class=""><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;  ">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span>
</div>
<br class=""></body></html>