mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
allow invalid RTCP packets in both client and server
(https://github.com/aler9/rtsp-simple-server/issues/1085) Invalid RTCP packets, in both server and client, do not trigger a fatal error anymore but they're just blocked. OnDecodeError() is called in order to emit a warning.
This commit is contained in:
@@ -825,8 +825,6 @@ func (c *Client) runReader() {
|
||||
|
||||
packets, err := rtcp.Unmarshal(payload)
|
||||
if err != nil {
|
||||
// some cameras send invalid RTCP packets.
|
||||
// ignore them.
|
||||
c.OnDecodeError(err)
|
||||
return nil
|
||||
}
|
||||
@@ -852,7 +850,8 @@ func (c *Client) runReader() {
|
||||
|
||||
packets, err := rtcp.Unmarshal(payload)
|
||||
if err != nil {
|
||||
return err
|
||||
c.OnDecodeError(err)
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, pkt := range packets {
|
||||
|
Reference in New Issue
Block a user