<div dir="ltr">Hi.<div><br></div><div>I have implemented a RTSP server with own recording files.<br></div><div><br></div><div><div>The problem occurs when removed stream socket while sending packet over tcp sockets.</div><div>
<br></div><div>When packet sending is failed in RTPInterface::sendDataOverTCP method, it called RTPInterface::removeStreamSocket method.</div><div><br></div><div>call stack like this : </div><div>RtspPlaybackServerTest.exe!RTPInterface::removeStreamSocket(int sockNum=444, unsigned char streamChannelId='') </div>
<div>RtspPlaybackServerTest.exe!RTPInterface::sendDataOverTCP(int socketNum=444, const unsigned char * data=0x000000528417e860, unsigned int dataSize=4, bool forceSendToSucceed=false) </div><div>RtspPlaybackServerTest.exe!RTPInterface::sendRTPorRTCPPacketOverTCP(unsigned char * packet=0x000000528b219070, unsigned int packetSize=1448, int socketNum=444, unsigned char streamChannelId='\0') </div>
<div>RtspPlaybackServerTest.exe!RTPInterface::sendPacket(unsigned char * packet=0x000000528b219070, unsigned int packetSize=1448) </div><div><br></div><div><br></div><div>RTPInterface::removeStreamSocket delete streamPtr. This occur crash in RTPInterface::sendPacket. because values of streams and streams->fNext are not valid.</div>
<div><br></div><div>When I added break; after success = False; statement, crash is not occured. but, I don't know this is right. </div><div><br></div><div>how to fix it?</div><div><br></div></div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">
<br></pre></div></div>