mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-21 14:19:26 +08:00
封装http-flv
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user