mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine protocol send. add utest for server auto response message
This commit is contained in:
parent
9556790a5e
commit
f7922e3823
2 changed files with 200 additions and 8 deletions
|
@ -460,15 +460,15 @@ int SrsProtocol::do_send_message(SrsMessage* msg, SrsPacket* packet)
|
|||
// chunk message header, 11 bytes
|
||||
// timestamp, 3bytes, big-endian
|
||||
u_int32_t timestamp = (u_int32_t)msg->header.timestamp;
|
||||
if (timestamp >= RTMP_EXTENDED_TIMESTAMP) {
|
||||
*pheader++ = 0xFF;
|
||||
*pheader++ = 0xFF;
|
||||
*pheader++ = 0xFF;
|
||||
} else {
|
||||
if (timestamp < RTMP_EXTENDED_TIMESTAMP) {
|
||||
pp = (char*)×tamp;
|
||||
*pheader++ = pp[2];
|
||||
*pheader++ = pp[1];
|
||||
*pheader++ = pp[0];
|
||||
} else {
|
||||
*pheader++ = 0xFF;
|
||||
*pheader++ = 0xFF;
|
||||
*pheader++ = 0xFF;
|
||||
}
|
||||
|
||||
// message_length, 3bytes, big-endian
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue