mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
srs-librtmp: implements the read packet.
This commit is contained in:
parent
c338eb3666
commit
efa09102cf
4 changed files with 137 additions and 1 deletions
|
@ -1025,6 +1025,14 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz
|
|||
|
||||
// ffmpeg/librtmp may donot send this filed, need to detect the value.
|
||||
// @see also: http://blog.csdn.net/win_lin/article/details/13363699
|
||||
// the extended-timestamp must be unsigned-int,
|
||||
// 24bits timestamp: 0xffffff = 16777215ms = 16777.215s = 4.66h
|
||||
// 32bits timestamp: 0xffffffff = 4294967295ms = 4294967.295s = 1193.046h = 49.71d
|
||||
// because the rtmp protocol says the 32bits timestamp is about "50 days":
|
||||
// 3. Byte Order, Alignment, and Time Format
|
||||
// Because timestamps are generally only 32 bits long, they will roll
|
||||
// over after fewer than 50 days.
|
||||
// so, use u_int32_t is right.
|
||||
u_int32_t timestamp = 0x00;
|
||||
char* pp = (char*)×tamp;
|
||||
pp[3] = *p++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue