Hi <br><br>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, Next time function handRead would goto line 227, and fNextTCPReadStreamSocketNum would not be set again in function SocketDescriptor::tcpReadHandler1, case AWAITING_SIZE2. Once it happen, rtsp client would never receive packets via RTP over RTSP connection.<br>
<br>It's very stranger why this scenarion dont' appear in example openRTSP. I just create a new MediaSink in my program, and it happened. too bad !!! :-(<br><br>Shiyong Zhang<br>