server: move address into Server struct

This commit is contained in:
aler9
2021-10-30 16:24:04 +02:00
committed by Alessandro Ros
parent 2882bacdf2
commit 1f5dec4a02
6 changed files with 115 additions and 66 deletions

View File

@@ -157,11 +157,12 @@ func main() {
// configure server
s := &gortsplib.Server{
Handler: &serverHandler{},
TLSConfig: &tls.Config{Certificates: []tls.Certificate{cert}},
Handler: &serverHandler{},
TLSConfig: &tls.Config{Certificates: []tls.Certificate{cert}},
RTSPAddress: ":8554",
}
// start server and wait until a fatal error
log.Printf("server is ready")
panic(s.StartAndWait(":8554"))
panic(s.StartAndWait())
}