Skip to content

Commit

Permalink
fix setup logic error on some camera
Browse files Browse the repository at this point in the history
修改了某些摄像头的流会导致SETUP的逻辑错误的问题
  • Loading branch information
macbookpro committed Jan 2, 2019
1 parent 31a0b34 commit c1bc466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtsp/rtsp-session.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func (session *Session) handleRequest(req *Request) {
//setupPath = setupPath[strings.LastIndex(setupPath, "/")+1:]
vPath := ""
if strings.Index(strings.ToLower(session.VControl), "rtsp://") == 0 {
vControlUrl, err := url.Parse(req.URL)
vControlUrl, err := url.Parse(session.VControl)
if err != nil {
res.StatusCode = 500
res.Status = "Invalid VControl"
Expand All @@ -411,7 +411,7 @@ func (session *Session) handleRequest(req *Request) {

aPath := ""
if strings.Index(strings.ToLower(session.AControl), "rtsp://") == 0 {
aControlUrl, err := url.Parse(req.URL)
aControlUrl, err := url.Parse(session.AControl)
if err != nil {
res.StatusCode = 500
res.Status = "Invalid AControl"
Expand Down

0 comments on commit c1bc466

Please sign in to comment.