diff --git a/protocol/rtsp/rtsp.go b/protocol/rtsp/rtsp.go index 7f032967..1ca0cec5 100644 --- a/protocol/rtsp/rtsp.go +++ b/protocol/rtsp/rtsp.go @@ -133,7 +133,7 @@ func ReadResponse(r io.Reader) (*Response, error) { } s := scanner.Text() - if len(s) < minResponse || s[:5] != "RTSP/" { + if len(s) < minResponse || !strings.HasPrefix(s, "RTSP/") { return nil, errInvalidResponse } resp.Proto = "RTSP"