From 005f52a6423a9ca6bf71cadd7d0eedee8f3f1a39 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Sun, 21 Aug 2011 21:03:21 +0200 Subject: [PATCH] More timestamp attempts... --- util/rtmpchunks.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/rtmpchunks.cpp b/util/rtmpchunks.cpp index ad0e6c57..6aa5f242 100644 --- a/util/rtmpchunks.cpp +++ b/util/rtmpchunks.cpp @@ -43,7 +43,6 @@ std::string RTMPStream::Chunk::Pack(){ unsigned int tmpi; unsigned char chtype = 0x00; //timestamp -= firsttime; - //if (timestamp < prev.timestamp){timestamp = prev.timestamp;} if ((prev.msg_type_id > 0) && (prev.cs_id == cs_id)){ if (msg_stream_id == prev.msg_stream_id){ chtype = 0x40;//do not send msg_stream_id @@ -56,6 +55,8 @@ std::string RTMPStream::Chunk::Pack(){ } } } + //override - we always sent type 0x00 if the timestamp has decreased since last chunk in this channel + if (timestamp < prev.timestamp){chtype = 0x00;} } if (cs_id <= 63){ output += (unsigned char)(chtype | cs_id);