fix: g711 override memory

fix: PacketizeRTP memory leak
fix: avoid read files beyond the log path
This commit is contained in:
langhuihui
2023-05-25 19:12:01 +08:00
parent d3b26d69fc
commit fc7ac81c4e
13 changed files with 132 additions and 40 deletions

View File

@@ -16,15 +16,3 @@ func TestBuffer(t *testing.T) {
}
})
}
func TestMallocSlice(t *testing.T) {
t.Run(t.Name(), func(t *testing.T) {
var a [][]byte = [][]byte{}
b := MallocSlice(&a)
if *b != nil {
t.Fail()
} else if *b = []byte{1}; a[0][0] != 1 {
t.Fail()
}
})
}