librtmp icon indicating copy to clipboard operation
librtmp copied to clipboard

Infinite calling

Open XinyuKhan opened this issue 6 years ago • 1 comments

XinyuKhan avatar May 29 '19 06:05 XinyuKhan

Hi everyone, I’m using rtmpdump code to push a rtmp stream from my device. The rtmp protocol is basing on the lwip network protocol, running in a FreeRTOS. I’m doing some test and I found some code in the rtmp protocol make me feel confused. I found the system will crash when I’m streaming and I shutdown the rtmp server application. So I began to debug and I found in this situation the RTMP_Close calling will go into a infinite calling, because I found The RTMP_Close will call the SendFCUnpublish function or SendDeleteStream function, and these two function will both call the RTMP_SendPacket function and RTMP_SendPacket will can the WriteN function to send the data through socket.. As the server application has been closed, The calling of the WriteN will return a error result,. The error will be processed in the RTMP_SendPacket function, by calling the RTMP_Close function. So these operations above will make it a infinite loop. So I wander is there any design problem in this code? I don’t know if I have make myself clear.

Best wish! Khan

XinyuKhan avatar May 29 '19 06:05 XinyuKhan