From 46f6a5d8e12c917904f651472cf013fc3145f59c Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Mon, 22 Aug 2022 06:54:42 +0300 Subject: [PATCH] Return unmodified errors from RTSP --- pkg/rtsp/conn.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/rtsp/conn.go b/pkg/rtsp/conn.go index d4d51da7..a86f0df8 100644 --- a/pkg/rtsp/conn.go +++ b/pkg/rtsp/conn.go @@ -629,7 +629,7 @@ func (c *Conn) Handle() (err error) { if channelID&1 == 0 { packet := &rtp.Packet{} if err = packet.Unmarshal(buf); err != nil { - return errors.New("wrong RTP data") + return } track := c.channels[channelID] @@ -643,12 +643,12 @@ func (c *Conn) Handle() (err error) { msg := &RTCP{Channel: channelID} if err = msg.Header.Unmarshal(buf); err != nil { - return errors.New("wrong RTCP data") + return } msg.Packets, err = rtcp.Unmarshal(buf) if err != nil { - return errors.New("wrong RTCP data") + return } c.Fire(msg)