Browse Source

fix: never parse client sent data when client is receiving

pull/2/head
aler9 6 years ago
parent
commit
dd8af1c2a2
  1. 4
      rtsp/conn.go
  2. 2
      rtsp_client.go

4
rtsp/conn.go

@ -84,3 +84,7 @@ func (c *Conn) WriteInterleavedFrame(frame []byte) error { @@ -84,3 +84,7 @@ func (c *Conn) WriteInterleavedFrame(frame []byte) error {
}
return nil
}
func (c *Conn) Read(buf []byte) (int, error) {
return c.c.Read(buf)
}

2
rtsp_client.go

@ -132,7 +132,7 @@ func (c *rtspClient) run() { @@ -132,7 +132,7 @@ func (c *rtspClient) run() {
if c.rtpProto == "tcp" {
buf := make([]byte, 2048)
for {
_, _, err := c.rconn.ReadInterleavedFrame(buf)
_, err := c.rconn.Read(buf)
if err != nil {
if err != io.EOF {
c.log("ERR: %s", err)

Loading…
Cancel
Save