mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
Merge pull request #9 from ciuncan/master
Fix #8 - Do options request to resource path rather than /
This commit is contained in:
@@ -351,12 +351,12 @@ func (c *ConnClient) Options(u *url.URL) (*base.Response, error) {
|
||||
|
||||
res, err := c.Do(&base.Request{
|
||||
Method: base.OPTIONS,
|
||||
// strip path
|
||||
Url: &url.URL{
|
||||
Scheme: "rtsp",
|
||||
Host: u.Host,
|
||||
User: u.User,
|
||||
Path: "/",
|
||||
// use the stream path, otherwise some cameras do not reply
|
||||
Path: u.Path,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
@@ -776,7 +776,8 @@ func (c *ConnClient) LoopUDP() error {
|
||||
Scheme: "rtsp",
|
||||
Host: c.streamUrl.Host,
|
||||
User: c.streamUrl.User,
|
||||
Path: "/",
|
||||
// use the stream path, otherwise some cameras do not reply
|
||||
Path: c.streamUrl.Path,
|
||||
},
|
||||
SkipResponse: true,
|
||||
})
|
||||
|
Reference in New Issue
Block a user