mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
return error in OnDecodeError when there are oversized UDP packets
This commit is contained in:
@@ -820,7 +820,7 @@ func (c *Client) runReader() {
|
||||
}
|
||||
} else {
|
||||
if len(payload) > maxPacketSize {
|
||||
return fmt.Errorf("payload size (%d) greater than maximum allowed (%d)",
|
||||
return fmt.Errorf("payload size (%d) is greater than maximum allowed (%d)",
|
||||
len(payload), maxPacketSize)
|
||||
}
|
||||
|
||||
@@ -846,7 +846,7 @@ func (c *Client) runReader() {
|
||||
processFunc = func(track *clientTrack, isRTP bool, payload []byte) error {
|
||||
if !isRTP {
|
||||
if len(payload) > maxPacketSize {
|
||||
return fmt.Errorf("payload size (%d) greater than maximum allowed (%d)",
|
||||
return fmt.Errorf("payload size (%d) is greater than maximum allowed (%d)",
|
||||
len(payload), maxPacketSize)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user