rtmp: bugfix createURL

This commit is contained in:
nareix 2016-07-13 20:20:01 +08:00
parent d4a1f50f7e
commit 49340a40ec

View File

@ -301,7 +301,10 @@ func createURL(tcurl, app, play string) (u *url.URL) {
out = append(out, s) out = append(out, s)
} }
} }
path := "/"+strings.Join(out, "/") if len(out) < 2 {
out = append(out, "")
}
path := strings.Join(out, "/")
u, _ = url.ParseRequestURI(path) u, _ = url.ParseRequestURI(path)
if tcurl != "" { if tcurl != "" {
@ -311,7 +314,6 @@ func createURL(tcurl, app, play string) (u *url.URL) {
u.Scheme = tu.Scheme u.Scheme = tu.Scheme
} }
} }
return return
} }
@ -875,6 +877,7 @@ func (self *Conn) WriteHeader(streams []av.CodecData) (err error) {
} }
} }
self.streams = streams
self.stage++ self.stage++
return return
} }