From 0a245c4cfe9298dc1235d8a1f9fa3b68095b210b Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 15 十二月 2023 17:54:34 +0800
Subject: [PATCH] 修复非鉴权接口的跨域失败问题

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

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 125e8a8..e4c2684 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
@@ -271,8 +271,10 @@
             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());
+                if (inviteInfo != null) {
+                    result.setStream_replace(inviteInfo.getStream());
+                    logger.info("[ZLM HOOK]鎺ㄦ祦閴存潈 stream: {} 鏇挎崲涓� {}", param.getStream(), inviteInfo.getStream());
+                }
             }
 
             // 璁剧疆闊抽淇℃伅鍙婂綍鍒朵俊鎭�

--
Gitblit v1.8.0