winlin

fix rtmp protocol bug, use 31bits timestamp

@@ -1030,6 +1030,8 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz @@ -1030,6 +1030,8 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz
1030 pp[1] = *p++; 1030 pp[1] = *p++;
1031 pp[0] = *p++; 1031 pp[0] = *p++;
1032 1032
  1033 + // ffmpeg/librtmp may donot send this filed, need to detect the value.
  1034 + // @see also: http://blog.csdn.net/win_lin/article/details/13363699
1033 // compare to the chunk timestamp, which is set by chunk message header 1035 // compare to the chunk timestamp, which is set by chunk message header
1034 // type 0,1 or 2. 1036 // type 0,1 or 2.
1035 u_int32_t chunk_timestamp = chunk->header.timestamp; 1037 u_int32_t chunk_timestamp = chunk->header.timestamp;
@@ -1042,8 +1044,6 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz @@ -1042,8 +1044,6 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz
1042 srs_verbose("header read ext_time completed. time=%"PRId64"", chunk->header.timestamp); 1044 srs_verbose("header read ext_time completed. time=%"PRId64"", chunk->header.timestamp);
1043 } 1045 }
1044 1046
1045 - // ffmpeg/librtmp may donot send this filed, need to detect the value.  
1046 - // @see also: http://blog.csdn.net/win_lin/article/details/13363699  
1047 // the extended-timestamp must be unsigned-int, 1047 // the extended-timestamp must be unsigned-int,
1048 // 24bits timestamp: 0xffffff = 16777215ms = 16777.215s = 4.66h 1048 // 24bits timestamp: 0xffffff = 16777215ms = 16777.215s = 4.66h
1049 // 32bits timestamp: 0xffffffff = 4294967295ms = 4294967.295s = 1193.046h = 49.71d 1049 // 32bits timestamp: 0xffffffff = 4294967295ms = 4294967.295s = 1193.046h = 49.71d