void RtspConnection::HandleRtcp(BufferReader& buffer)
{
char* peek = buffer.Peek();
if (peek[0] == '$' && buffer.ReadableBytes() > 4)
{
uint32_t pkt_size = peek[2] << 8 | peek[3];
if (pkt_size + 4 >= buffer.ReadableBytes())
{
buffer.Retrieve(pkt_size + 4);
}
}
}
If there are double speed requests and other data in the buffer, may the original logic skip these data due to the condition not being met, resulting in parsing failure