From 6f76c0f6cf0e15393f9b61a1e9cd4181be0ee334 Mon Sep 17 00:00:00 2001 From: "xianghan228@qq.com" Date: Tue, 24 Nov 2020 10:32:28 +0800 Subject: [PATCH] Update server.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #bug RTP视频通道设置不正错 --- pkg/rtsp/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/rtsp/server.go b/pkg/rtsp/server.go index 3461fc7..5f40850 100644 --- a/pkg/rtsp/server.go +++ b/pkg/rtsp/server.go @@ -273,11 +273,11 @@ Loop: vRTPChannel, _ := strconv.Atoi(tcpMatchs[1]) vRTPControlChannel, _ := strconv.Atoi(tcpMatchs[3]) if pubSession != nil { - pubSession.SetTCPAudioRTPChannel(vRTPChannel, vRTPControlChannel) + pubSession.SetTCPVideoRTPChannel(vRTPChannel, vRTPControlChannel) //暂时不知道需要不需要赋值 pubSession.SetRemoteAddr(conn.RemoteAddr().String()) } else if subSession != nil { - subSession.SetTCPAudioRTPChannel(vRTPChannel, vRTPControlChannel) + subSession.SetTCPVideoRTPChannel(vRTPChannel, vRTPControlChannel) } } else {