From 426ea72d7f31e0f4c5ad90c48d98299b9ac83e45 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 1 Apr 2024 15:46:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=89=E6=B5=81=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 2 +- .../com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java | 5 ++++- 2 files changed, 5 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 abea49fb..c9aad4d4 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 @@ -151,7 +151,7 @@ public class ZLMHttpHookListener { logger.info("[ZLM HOOK] 播放鉴权 失败:{}->{}", param.getMediaServerId(), param); return new HookResult(401, "Unauthorized"); } - logger.info("[ZLM HOOK] 播放鉴权 成功:{}->{}", param.getMediaServerId(), param); + logger.info("[ZLM HOOK] 播放鉴权 失败:{}->{}", param.getMediaServerId(), param); return HookResult.SUCCESS(); } diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java index d98b52e4..e9807628 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java @@ -87,7 +87,10 @@ public class MediaServiceImpl implements IMediaService { return true; } StreamAuthorityInfo streamAuthorityInfo = redisCatchStorage.getStreamAuthorityInfo(app, stream); - return (streamAuthorityInfo != null && streamAuthorityInfo.getCallId() != null && streamAuthorityInfo.getCallId().equals(callId)); + if (streamAuthorityInfo == null || streamAuthorityInfo.getCallId() == null) { + return true; + } + return streamAuthorityInfo.getCallId().equals(callId); } @Override