封装http-flv

This commit is contained in:
yangjiechina
2024-03-10 14:31:14 +08:00
parent 096493aa44
commit 596502d215
13 changed files with 484 additions and 210 deletions

View File

@@ -187,12 +187,11 @@ func (m *memoryPool) FreeTail() {
}
func (m *memoryPool) Data() ([]byte, []byte) {
if m.tail <= m.head {
if m.tail <= m.head && !m.blockQueue.IsEmpty() {
return m.data[m.head:m.capacity], m.data[:m.tail]
} else {
return m.data[m.head:m.tail], nil
}
}
func (m *memoryPool) Clear() {