From fe19ea3991bd9ad50162d2947679dd9d981ff844 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 8 May 2019 18:46:56 +0800 Subject: [PATCH] =?UTF-8?q?rtsp=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=8F=91=E9=80=81rtcp=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspSession.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index e05275b4..3ecec4a9 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -1210,7 +1210,8 @@ inline void RtspSession::sendRtpPacket(const RtpPacket::Ptr & pkt) { #ifdef RTSP_SEND_RTCP inline void RtspSession::sendSenderReport(bool overTcp,int iTrackIndex) { - uint8_t aui8Rtcp[4 + 28 + 10 + sizeof(SERVER_NAME) + 1] = {0}; + static const char server_name[] = "ZLMediaKitRtsp"; + uint8_t aui8Rtcp[4 + 28 + 10 + sizeof(server_name) + 1] = {0}; uint8_t *pui8Rtcp_SR = aui8Rtcp + 4, *pui8Rtcp_SDES = pui8Rtcp_SR + 28; auto &track = _aTrackInfo[iTrackIndex]; auto &counter = _aRtcpCnt[iTrackIndex]; @@ -1258,8 +1259,8 @@ inline void RtspSession::sendSenderReport(bool overTcp,int iTrackIndex) { pui8Rtcp_SDES[8] = 0x01; pui8Rtcp_SDES[9] = 0x0f; - memcpy(&pui8Rtcp_SDES[10], SERVER_NAME, sizeof(SERVER_NAME)); - pui8Rtcp_SDES[10 + sizeof(SERVER_NAME)] = 0x00; + memcpy(&pui8Rtcp_SDES[10], server_name, sizeof(server_name)); + pui8Rtcp_SDES[10 + sizeof(server_name)] = 0x00; if(overTcp){ send(obtainBuffer((char *) aui8Rtcp, sizeof(aui8Rtcp)));