ServerConn: support SETUP calls without trackID (https://github.com/aler9/rtsp-simple-server/issues/155)

This commit is contained in:
aler9
2021-01-18 13:13:34 +01:00
parent 9602c653a7
commit 4c12bbe5a0
5 changed files with 79 additions and 8 deletions

View File

@@ -19,8 +19,8 @@ import (
var mutex sync.Mutex
var publisher *gortsplib.ServerConn
var sdp []byte
var readers = make(map[*gortsplib.ServerConn]struct{})
var sdp []byte
// this is called for each incoming connection
func handleConn(conn *gortsplib.ServerConn) {
@@ -116,7 +116,7 @@ func handleConn(conn *gortsplib.ServerConn) {
}, nil
}
// called after receiving a Frame.
// called after receiving a frame.
onFrame := func(trackID int, typ gortsplib.StreamType, buf []byte) {
mutex.Lock()
defer mutex.Unlock()