unexport ConnClient.WriteFrame

This commit is contained in:
aler9
2020-09-06 14:53:42 +02:00
parent 648b33b13d
commit 391bc2441f

View File

@@ -234,8 +234,9 @@ func (c *ConnClient) Do(req *Request) (*Response, error) {
return res, nil return res, nil
} }
// WriteFrame writes an InterleavedFrame. // this can't be exported
func (c *ConnClient) WriteFrame(frame *InterleavedFrame) error { // otherwise there's a race condition with the rtcp receiver report routine
func (c *ConnClient) writeFrame(frame *InterleavedFrame) error {
c.nconn.SetWriteDeadline(time.Now().Add(c.conf.WriteTimeout)) c.nconn.SetWriteDeadline(time.Now().Add(c.conf.WriteTimeout))
return frame.Write(c.bw) return frame.Write(c.bw)
} }
@@ -603,7 +604,7 @@ func (c *ConnClient) Play(u *url.URL) (*Response, error) {
}) })
} else { } else {
c.WriteFrame(&InterleavedFrame{ c.writeFrame(&InterleavedFrame{
TrackId: trackId, TrackId: trackId,
StreamType: StreamTypeRtcp, StreamType: StreamTypeRtcp,
Content: frame, Content: frame,