mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
replace new() with initialize() (#490)
This commit is contained in:
10
client.go
10
client.go
@@ -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
|
||||
|
Reference in New Issue
Block a user