fix: channel status wrong,change uint32 port to uint16

This commit is contained in:
pggiroro
2025-09-18 17:02:36 +08:00
parent 434a8d5dd2
commit 8fb9ba4795
2 changed files with 2 additions and 5 deletions

View File

@@ -625,9 +625,6 @@ func (d *Device) frontEndCmdString(cmdCode int32, parameter1 int32, parameter2 i
}
func (d *Device) addOrUpdateChannel(c gb28181.DeviceChannel) {
// 设置通道状态为在线
c.Status = gb28181.ChannelOnStatus
if channel, ok := d.channels.Get(c.ID); ok {
// 通道已存在,保留自定义字段
if channel.DeviceChannel != nil {

View File

@@ -238,13 +238,13 @@ func (p *RTPPlugin) Forward(ctx context.Context, req *pb.ForwardRequest) (res *p
config := &mrtp.ForwardConfig{
Source: mrtp.ConnectionConfig{
IP: req.Source.Ip,
Port: req.Source.Port,
Port: uint16(req.Source.Port), //req.Source.Port,
Mode: mrtp.StreamMode(req.Source.Mode),
SSRC: req.Source.Ssrc,
},
Target: mrtp.ConnectionConfig{
IP: req.Target.Ip,
Port: req.Target.Port,
Port: uint16(req.Target.Port),
Mode: mrtp.StreamMode(req.Target.Mode),
SSRC: req.Target.Ssrc,
},