Fix double slashes in RTMP URL

This commit is contained in:
Ingo Oppermann
2022-09-30 09:25:29 +02:00
parent a114f426d4
commit bbcf0ab1b1

View File

@@ -454,7 +454,12 @@ func (a *api) start() error {
host = "localhost"
}
template := "rtmp://" + host + ":" + port + cfg.RTMP.App + "/{name}"
template := "rtmp://" + host + ":" + port
if cfg.RTMP.App != "/" {
template += cfg.RTMP.App
}
template += "/{name}"
if len(cfg.RTMP.Token) != 0 {
template += "?token=" + cfg.RTMP.Token
}