protocol/rtsp/client.go: using u instead of url from url.Parse in Client.Setup()

This commit is contained in:
Saxon 2019-04-30 21:33:35 +09:30
parent 8196df52d7
commit a4da3dab15
1 changed files with 2 additions and 2 deletions

View File

@ -81,12 +81,12 @@ func (c *Client) Options() (*Response, error) {
// Setup forms and sends an RTSP request of method SETUP to the RTSP server. // Setup forms and sends an RTSP request of method SETUP to the RTSP server.
func (c *Client) Setup(track, transport string) (*Response, error) { func (c *Client) Setup(track, transport string) (*Response, error) {
url, err := url.Parse(c.addr + "/" + track) u, err := url.Parse(c.addr + "/" + track)
if err != nil { if err != nil {
return nil, err return nil, err
} }
req, err := NewRequest("SETUP", c.nextCSeq(), url, nil) req, err := NewRequest("SETUP", c.nextCSeq(), u, nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }