mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
base: add tests
This commit is contained in:
@@ -79,12 +79,12 @@ func (f *InterleavedFrame) Read(br *bufio.Reader) error {
|
||||
}
|
||||
|
||||
if header[0] != interleavedFrameMagicByte {
|
||||
return fmt.Errorf("wrong magic byte (0x%.2x)", header[0])
|
||||
return fmt.Errorf("invalid magic byte (0x%.2x)", header[0])
|
||||
}
|
||||
|
||||
framelen := int(binary.BigEndian.Uint16(header[2:]))
|
||||
if framelen > len(f.Payload) {
|
||||
return fmt.Errorf("frame length greater than maximum allowed (%d vs %d)",
|
||||
return fmt.Errorf("payload size greater than maximum allowed (%d vs %d)",
|
||||
framelen, len(f.Payload))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user