winlin

add comments for extended-timestamp, always send the extended-timestamp even chunk type=0x03

@@ -418,7 +418,7 @@ int SrsProtocol::send_message(ISrsMessage* msg) @@ -418,7 +418,7 @@ int SrsProtocol::send_message(ISrsMessage* msg)
418 418
419 // chunk extended timestamp header, 0 or 4 bytes, big-endian 419 // chunk extended timestamp header, 0 or 4 bytes, big-endian
420 if(msg->header.timestamp >= RTMP_EXTENDED_TIMESTAMP){ 420 if(msg->header.timestamp >= RTMP_EXTENDED_TIMESTAMP){
421 - pp = (char*)&msg->header.timestamp; 421 + pp = (char*)&msg->header.timestamp;
422 *pheader++ = pp[3]; 422 *pheader++ = pp[3];
423 *pheader++ = pp[2]; 423 *pheader++ = pp[2];
424 *pheader++ = pp[1]; 424 *pheader++ = pp[1];
@@ -433,6 +433,18 @@ int SrsProtocol::send_message(ISrsMessage* msg) @@ -433,6 +433,18 @@ int SrsProtocol::send_message(ISrsMessage* msg)
433 *pheader++ = 0xC0 | (msg->get_perfer_cid() & 0x3F); 433 *pheader++ = 0xC0 | (msg->get_perfer_cid() & 0x3F);
434 434
435 // chunk extended timestamp header, 0 or 4 bytes, big-endian 435 // chunk extended timestamp header, 0 or 4 bytes, big-endian
  436 + // 6.1.3. Extended Timestamp
  437 + // This field is transmitted only when the normal time stamp in the
  438 + // chunk message header is set to 0x00ffffff. If normal time stamp is
  439 + // set to any value less than 0x00ffffff, this field MUST NOT be
  440 + // present. This field MUST NOT be present if the timestamp field is not
  441 + // present. Type 3 chunks MUST NOT have this field.
  442 + // adobe changed for Type3 chunk:
  443 + // FMLE always sendout the extended-timestamp,
  444 + // must send the extended-timestamp to FMS,
  445 + // must send the extended-timestamp to flash-player.
  446 + // @see: ngx_rtmp_prepare_message
  447 + // @see: http://blog.csdn.net/win_lin/article/details/13363699
436 if(msg->header.timestamp >= RTMP_EXTENDED_TIMESTAMP){ 448 if(msg->header.timestamp >= RTMP_EXTENDED_TIMESTAMP){
437 pp = (char*)&msg->header.timestamp; 449 pp = (char*)&msg->header.timestamp;
438 *pheader++ = pp[3]; 450 *pheader++ = pp[3];