mirror of
https://github.com/aler9/gortsplib
synced 2025-10-26 16:50:32 +08:00
do not treat generic bytes as strings into errors
This commit is contained in:
@@ -139,10 +139,10 @@ func (res *Response) Read(rb *bufio.Reader) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
proto := string(byts[:len(byts)-1])
|
||||
proto := byts[:len(byts)-1]
|
||||
|
||||
if proto != rtspProtocol10 {
|
||||
return fmt.Errorf("expected '%s', got '%s'", rtspProtocol10, proto)
|
||||
if string(proto) != rtspProtocol10 {
|
||||
return fmt.Errorf("expected '%s', got %v", rtspProtocol10, proto)
|
||||
}
|
||||
|
||||
byts, err = readBytesLimited(rb, ' ', 4)
|
||||
|
||||
Reference in New Issue
Block a user