Commit b699158e4336d6a00e0600e9f0058ba30533fb52

Authored by 648540858
1 parent eac72fd0

修复点播流地址修改

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
61 61 return;
62 62 }
63 63 SIPRequest request = (SIPRequest) evt.getRequest();
64   - logger.info("[收到心跳] device: {}, callId: {}", device.getDeviceId(), request.getCallIdHeader().getCallId());
  64 + logger.info("[收到心跳] device: {}, callId: {}", device.getDeviceId(), request.getCallIdHeader().getCallId());
65 65  
66 66 // 回复200 OK
67 67 try {
... ...
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
... ... @@ -264,11 +264,13 @@ public class ZLMHttpHookListener {
264 264  
265 265 // 国标流
266 266 if ("rtp".equals(param.getApp()) ) {
267   - String ssrc = String.format("%010d", Long.parseLong(param.getStream(), 16));
268   - InviteInfo inviteInfo = inviteStreamService.getInviteInfoBySSRC(ssrc);
  267 +
  268 + InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, param.getStream());
269 269  
270 270 // 单端口模式下修改流 ID
271   - if (!mediaInfo.isRtpEnable() && inviteInfo != null) {
  271 + if (!mediaInfo.isRtpEnable() && inviteInfo == null) {
  272 + String ssrc = String.format("%010d", Long.parseLong(param.getStream(), 16));
  273 + inviteInfo = inviteStreamService.getInviteInfoBySSRC(ssrc);
272 274 result.setStream_replace(inviteInfo.getStream());
273 275 logger.info("[ZLM HOOK]推流鉴权 stream: {} 替换为 {}", param.getStream(), inviteInfo.getStream());
274 276 }
... ...