From bef7e20ed98302c8eb3acdea5447be0825034a5b Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 7 Mar 2014 13:35:03 +0800 Subject: [PATCH] fix rtmp protocol bug, use 31bits timestamp --- trunk/src/rtmp/srs_protocol_rtmp_stack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/rtmp/srs_protocol_rtmp_stack.cpp b/trunk/src/rtmp/srs_protocol_rtmp_stack.cpp index 860170bc0..d1bf6a40a 100644 --- a/trunk/src/rtmp/srs_protocol_rtmp_stack.cpp +++ b/trunk/src/rtmp/srs_protocol_rtmp_stack.cpp @@ -1030,6 +1030,8 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz pp[1] = *p++; pp[0] = *p++; + // ffmpeg/librtmp may donot send this filed, need to detect the value. + // @see also: http://blog.csdn.net/win_lin/article/details/13363699 // compare to the chunk timestamp, which is set by chunk message header // type 0,1 or 2. u_int32_t chunk_timestamp = chunk->header.timestamp; @@ -1042,8 +1044,6 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz srs_verbose("header read ext_time completed. time=%"PRId64"", chunk->header.timestamp); } - // 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