From c1bc466bbad6f520c4644cfa4e7a32ebf92abc7b Mon Sep 17 00:00:00 2001 From: macbookpro Date: Wed, 2 Jan 2019 09:34:29 +0800 Subject: [PATCH] =?UTF-8?q?fix=20setup=20logic=20error=20on=20some=20camer?= =?UTF-8?q?a=20=E4=BF=AE=E6=94=B9=E4=BA=86=E6=9F=90=E4=BA=9B=E6=91=84?= =?UTF-8?q?=E5=83=8F=E5=A4=B4=E7=9A=84=E6=B5=81=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?SETUP=E7=9A=84=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtsp/rtsp-session.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtsp/rtsp-session.go b/rtsp/rtsp-session.go index a33e434b..4276a333 100644 --- a/rtsp/rtsp-session.go +++ b/rtsp/rtsp-session.go @@ -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" @@ -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"