From 7ce0ad4f35db0eaca65b83846455ff777b967f99 Mon Sep 17 00:00:00 2001 From: q191201771 <191201771@qq.com> Date: Sat, 3 Apr 2021 22:56:50 +0800 Subject: [PATCH] prev commit patch: fix aggregate timestamp --- pkg/rtmp/chunk_composer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rtmp/chunk_composer.go b/pkg/rtmp/chunk_composer.go index 5a54cef..767b91d 100644 --- a/pkg/rtmp/chunk_composer.go +++ b/pkg/rtmp/chunk_composer.go @@ -187,7 +187,7 @@ func (c *ChunkComposer) RunLoop(reader io.Reader, cb OnCompleteMessage) error { } aggregateStream.header.MsgTypeID = stream.msg.buf[0] aggregateStream.header.MsgLen = bele.BEUint24(stream.msg.buf[1:]) - aggregateStream.timestamp = bele.BEUint24(stream.msg.buf[4:]) + uint32(stream.msg.buf[7]) + aggregateStream.timestamp = bele.BEUint24(stream.msg.buf[4:]) + (uint32(stream.msg.buf[7]) << 24) aggregateStream.header.MsgStreamID = int(bele.BEUint24(stream.msg.buf[8:])) stream.msg.consumed(11)