add more details to errors

This commit is contained in:
aler9
2021-01-29 12:51:25 +01:00
parent 0af60f95f8
commit ec3002e995
2 changed files with 4 additions and 2 deletions

View File

@@ -22,7 +22,8 @@ func (c *payload) read(rb *bufio.Reader, header Header) error {
}
if cl > rtspMaxContentLength {
return fmt.Errorf("Content-Length exceeds %d", rtspMaxContentLength)
return fmt.Errorf("Content-Length exceeds %d (it's %d)",
rtspMaxContentLength, cl)
}
*c = make([]byte, cl)