fix: seqhead will reset timestamp

This commit is contained in:
langhuihui
2024-02-11 09:24:26 +08:00
parent 2fc87b15dc
commit 5f36b127f2

View File

@@ -23,7 +23,11 @@ func (av *AVSender) sendSequenceHead(seqHead []byte) {
runtime.Gosched()
}
defer av.writing.Store(false)
av.WriteTo(RTMP_CHUNK_HEAD_12, &av.chunkHeader)
if av.firstSent {
av.WriteTo(RTMP_CHUNK_HEAD_8, &av.chunkHeader)
} else {
av.WriteTo(RTMP_CHUNK_HEAD_12, &av.chunkHeader)
}
av.sendChunk(seqHead)
}