From d41d116a6768fd4c8441518418af6676405a2a01 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Tue, 10 Sep 2019 16:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=B8=A6url=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9A=84rtsp=E6=8E=A8=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspSession.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index 93ff1e7c..44586770 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -248,7 +248,8 @@ void RtspSession::handleReq_ANNOUNCE(const Parser &parser) { _pushSrc = std::make_shared(_mediaInfo._vhost,_mediaInfo._app,_mediaInfo._streamid); _pushSrc->setListener(dynamic_pointer_cast(shared_from_this())); _pushSrc->onGetSDP(sdpParser.toString()); - sendRtspResponse("200 OK"); + + sendRtspResponse("200 OK",{"Content-Base",_strContentBase + "/"}); } void RtspSession::handleReq_RECORD(const Parser &parser){ @@ -572,7 +573,7 @@ inline void RtspSession::send_SessionNotFound() { void RtspSession::handleReq_Setup(const Parser &parser) { //处理setup命令,该函数可能进入多次 - auto controlSuffix = split(parser.Url(),"/").back();// parser.FullUrl().substr(_strContentBase.size()); + auto controlSuffix = split(parser.FullUrl(),"/").back();// parser.FullUrl().substr(_strContentBase.size()); if(controlSuffix.front() == '/'){ controlSuffix = controlSuffix.substr(1); }