replace new() with initialize() (#490)

This commit is contained in:
Alessandro Ros
2023-12-26 12:48:35 +01:00
committed by GitHub
parent e77b281395
commit 2d0c530d97
37 changed files with 464 additions and 521 deletions

View File

@@ -884,7 +884,10 @@ func (c *Client) connOpen() error {
c.nconn = nconn
bc := bytecounter.New(c.nconn, c.BytesReceived, c.BytesSent)
c.conn = conn.NewConn(bc)
c.reader = newClientReader(c)
c.reader = &clientReader{
c: c,
}
c.reader.start()
return nil
}
@@ -1290,7 +1293,10 @@ func (c *Client) doSetup(
}(),
}
cm := newClientMedia(c)
cm := &clientMedia{
c: c,
onPacketRTCP: func(rtcp.Packet) {},
}
if c.effectiveTransport == nil {
if c.connURL.Scheme == "rtsps" { // always use TCP if encrypted