mirror of https://bitbucket.org/ausocean/av.git
protocol/rtsp: fixed sscanf in ReadResponse
This commit is contained in:
parent
fa7c3044f3
commit
d7c2421146
|
@ -140,7 +140,7 @@ func ReadResponse(r io.Reader) (*Response, error) {
|
||||||
}
|
}
|
||||||
resp.Proto = "RTSP"
|
resp.Proto = "RTSP"
|
||||||
|
|
||||||
_, err = fmt.Sscanf(s[5:12], "%d.%d %d %s", &resp.ProtoMajor, &resp.ProtoMinor, &resp.StatusCode)
|
_, err = fmt.Sscanf(s[5:12], "%d.%d %d", &resp.ProtoMajor, &resp.ProtoMinor, &resp.StatusCode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue