增加读取缓存大小,设置Mark标志位

This commit is contained in:
dexter
2021-12-29 20:18:12 +08:00
parent af053bb5e6
commit 2f7c2de352
2 changed files with 7 additions and 4 deletions

View File

@@ -145,12 +145,14 @@ func (client *RTSPClient) pullStream() {
}
client.Client = &gortsplib.Client{
OnPacketRTP: func(trackID int, payload []byte) {
// Println("OnPacketRTP", trackID, len(payload))
if f := client.processFunc[trackID]; f != nil {
var clone []byte
f(append(clone, payload...))
}
},
Transport: &client.Transport,
ReadBufferSize: 10000,
Transport: &client.Transport,
}
// parse URL
u, err := base.ParseURL(client.URL)