From b699158e4336d6a00e0600e9f0058ba30533fb52 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Wed, 13 Dec 2023 14:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=82=B9=E6=92=AD=E6=B5=81?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../message/notify/cmd/KeepaliveNotifyMessageHandler.java | 2 +- .../genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java index 6a176006..389e4013 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java @@ -61,7 +61,7 @@ public class KeepaliveNotifyMessageHandler extends SIPRequestProcessorParent imp return; } SIPRequest request = (SIPRequest) evt.getRequest(); - logger.info("[收到心跳], device: {}, callId: {}", device.getDeviceId(), request.getCallIdHeader().getCallId()); + logger.info("[收到心跳] device: {}, callId: {}", device.getDeviceId(), request.getCallIdHeader().getCallId()); // 回复200 OK try { diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java index 1b4b94ec..125e8a8a 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java @@ -264,11 +264,13 @@ public class ZLMHttpHookListener { // 国标流 if ("rtp".equals(param.getApp()) ) { - String ssrc = String.format("%010d", Long.parseLong(param.getStream(), 16)); - InviteInfo inviteInfo = inviteStreamService.getInviteInfoBySSRC(ssrc); + + InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, param.getStream()); // 单端口模式下修改流 ID - if (!mediaInfo.isRtpEnable() && inviteInfo != null) { + if (!mediaInfo.isRtpEnable() && inviteInfo == null) { + String ssrc = String.format("%010d", Long.parseLong(param.getStream(), 16)); + inviteInfo = inviteStreamService.getInviteInfoBySSRC(ssrc); result.setStream_replace(inviteInfo.getStream()); logger.info("[ZLM HOOK]推流鉴权 stream: {} 替换为 {}", param.getStream(), inviteInfo.getStream()); }