Do not use file mode for SRT

This commit is contained in:
Alexandre Iooss 2020-10-04 11:25:55 +02:00
parent 97ac6f370d
commit 3f5d317250
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 3 additions and 7 deletions

View File

@ -45,16 +45,12 @@ func splitHostPort(hostport string) (string, uint16) {
// Serve SRT server
func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet) {
// Start SRT in listen mode
// Start SRT in listening mode
log.Printf("SRT server listening on %s", cfg.ListenAddress)
host, port := splitHostPort(cfg.ListenAddress)
options := map[string]string{
"transtype": "file",
"mode": "listener",
}
sck := srtgo.NewSrtSocket(host, port, options)
sck := srtgo.NewSrtSocket(host, port, nil)
if err := sck.Listen(cfg.MaxClients); err != nil {
log.Fatal("Unable to listen to SRT clients:", err)
log.Fatal("Unable to listen for SRT clients:", err)
}
// FIXME: Get the stream type