Browse Source

support rtsp urls without port

pull/31/head v0.8.1
aler9 5 years ago
parent
commit
adb3909f63
  1. 4
      streamer.go

4
streamer.go

@ -52,7 +52,9 @@ func newStreamer(p *program, path string, source string, sourceProtocol string) @@ -52,7 +52,9 @@ func newStreamer(p *program, path string, source string, sourceProtocol string)
if ur.Scheme != "rtsp" {
return nil, fmt.Errorf("'%s' is not a valid RTSP url", source)
}
if ur.Port() == "" {
ur.Host += ":554"
}
if ur.User != nil {
pass, _ := ur.User.Password()
user := ur.User.Username()

Loading…
Cancel
Save