change error msg
This commit is contained in:
parent
769d03cb9f
commit
b9fb9fc360
@ -251,7 +251,7 @@ func (self *Client) ReadResponse() (res Response, err error) {
|
|||||||
|
|
||||||
fline := strings.SplitN(line, " ", 3)
|
fline := strings.SplitN(line, " ", 3)
|
||||||
if len(fline) < 2 {
|
if len(fline) < 2 {
|
||||||
err = fmt.Errorf("malformed RTSP response line")
|
err = fmt.Errorf("rtsp: malformed response line")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -682,12 +682,12 @@ func (self *Client) parseBlock(blockNo int, packet []byte) (streamIndex int, err
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if len(packet) < 8 {
|
if len(packet) < 8 {
|
||||||
err = fmt.Errorf("rtp packet too short")
|
err = fmt.Errorf("rtp: packet too short")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
payloadOffset := 12+int(packet[0]&0xf)*4
|
payloadOffset := 12+int(packet[0]&0xf)*4
|
||||||
if payloadOffset+2 > len(packet) {
|
if payloadOffset+2 > len(packet) {
|
||||||
err = fmt.Errorf("rtp packet too short")
|
err = fmt.Errorf("rtp: packet too short")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user