<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite">In function RTPInterface::handleRead (version 2012/04/04),<br><br>225 if (fNextTCPReadStreamSocketNum < 0) {<br>226 // Normal case: read from the (datagram) 'groupsock':<br>227 readSuccess = fGS->handleRead(buffer, bufferMaxSize, bytesRead, fromAddress);<br>
228 } else {<br> ...<br>242 fNextTCPReadSize -= bytesRead;<br>243 if (curBytesRead == 0 && curBytesToRead > 0) {<br>244 packetReadWasIncomplete = True;<br>245 return True;<br>246 } else if (curBytesRead < 0) {<br>
247 bytesRead = 0;<br>248 readSuccess = False;<br>249 } else {<br>250 readSuccess = True;<br>251 }<br>252 fNextTCPReadStreamSocketNum = -1; // default, for next time<br> ...<br><br>Pay attension to line 252, variable fNextTCPReadStreamSocketNum is reset to -1 when handRead succeed(readSuccess=True). But at this time it is possible for condition fNextTCPReadSize > 0. if there are still bytes in TCP, and fNextTCPReadStreamSocketNum was reset to -1</blockquote><div><br></div>Yes, you have discovered a bug. Thank you.</div><div><br></div><div>Note, however, that the bug will show up only if the condition in the "if" statement on line 232:</div><div><span class="Apple-tab-span" style="white-space:pre"> if (</span><span class="Apple-tab-span" style="white-space: pre; ">totBytesToRead > bufferMaxSize</span><span class="Apple-tab-span" style="white-space:pre">) totBytesToRead = bufferMaxSize;</span></div><div>is true. I.e., the bug will show up only if "<span class="Apple-tab-span" style="white-space: pre; ">totBytesToRead > bufferMaxSize</span>". (Because otherwise, upon exiting the "while" loop, the condition on line 243 will be true, and we'll return without getting to line 252.)</div><div><br></div><div>But nonetheless, there is a bug. You should be able to fix it by replacing line 243</div><div><span class="Apple-tab-span" style="white-space:pre"> if (curBytesRead == 0 && curBytesToRead > 0) {</span></div><div>with</div><div><span class="Apple-tab-span" style="white-space:pre"> if (fNextTCPReadSize > 0) {</span></div><div><br></div><div>If this doesn't fix the problem, then please let us know. Otherwise, this fix will be included in the next release of the software.</div><div><br></div><div>Thank you again.</div><br><br><div apple-content-edited="true">
<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; font-size: medium; "><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; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>