diff --git a/protocol/rtsp/client.go b/protocol/rtsp/client.go index 519f17d2..24265c65 100644 --- a/protocol/rtsp/client.go +++ b/protocol/rtsp/client.go @@ -36,11 +36,11 @@ import ( // Client describes an RTSP Client. type Client struct { - cSeq int - addr string - url *url.URL - conn net.Conn - session string + cSeq int + addr string + url *url.URL + conn net.Conn + sessionID string } // NewClient returns a pointer to a new Client. The URL u will be parsed and @@ -95,7 +95,7 @@ func (c *Client) Setup(track, transport string) (*Response, error) { if err != nil { return nil, err } - c.session = resp.Header.Get("Session") + c.sessionID = resp.Header.Get("Session") return resp, err } @@ -106,7 +106,7 @@ func (c *Client) Play() (*Response, error) { if err != nil { return nil, err } - req.Header.Add("Session", c.session) + req.Header.Add("Session", c.sessionID) return c.Do(req) }