Closed pythys closed 4 months ago
Yeah, yes! SRS will firstly identify the connection type of the client by SrsRtmpServer::identify_client
. When receiving the message, it determines whether the AMF commands are amf0/amf3 and decides whether to ignore the packet or wait for the client to republish. You can refer to the modification method here.(https://github.com/ossrs/srs/issues/958)
About this question we will discuss further.
Description
on SRS both versions 4 and 5 (including minor versions) I get a memory leak when I receive an RTMP stream using the method flash-publish.
Flash publish is identified from the headers:
so it is whenever I receive
0x0201
that the server blows up and is no longer capable of receiving new streams as per the error logsSRS Version: 5.0.166 (docker)
SRS Log:
The memory leak seems to be happening in 2023-07-11-flash-publish-srs-leak.txt
Replay
simply receive the stream as publish using above streaming header
Expect
The stream should be ingested OR rejected (because not yet implemented), but what happens instead is the memory leak and crash
analysis
My suspicion is the code block related to having AMF commands combined with flash-publish header: