From 2f1161819919214ed3c4eb8f094ef1839671ee97 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 17 十月 2022 14:08:44 +0800
Subject: [PATCH] 修复用户删除失败,#636
---
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 36 +++++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 13 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 b043cad..e1689c9 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -521,10 +521,15 @@
if (sendRtpItem.getApp().equals(app)) {
String platformId = sendRtpItem.getPlatformId();
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformId);
+ Device device = deviceService.queryDevice(platformId);
try {
- commanderFroPlatform.streamByeCmd(platform, sendRtpItem);
- } catch (SipException | InvalidArgumentException | ParseException e) {
+ if (platform != null) {
+ commanderFroPlatform.streamByeCmd(platform, sendRtpItem);
+ }else {
+ cmder.streamByeCmd(device, sendRtpItem.getChannelId(), stream, sendRtpItem.getCallId());
+ }
+ } catch (SipException | InvalidArgumentException | ParseException | SsrcTransactionNotFoundException e) {
logger.error("[鍛戒护鍙戦�佸け璐 鍥芥爣绾ц仈 鍙戦�丅YE: {}", e.getMessage());
}
}
@@ -587,19 +592,24 @@
storager.stopPlay(streamInfoForPlayCatch.getDeviceID(), streamInfoForPlayCatch.getChannelId());
}else{
StreamInfo streamInfoForPlayBackCatch = redisCatchStorage.queryPlayback(null, null, streamId, null);
- if (streamInfoForPlayBackCatch != null) {
- Device device = deviceService.queryDevice(streamInfoForPlayCatch.getDeviceID());
- if (device != null) {
- try {
- cmder.streamByeCmd(device,streamInfoForPlayBackCatch.getChannelId(),
- streamInfoForPlayBackCatch.getStream(), null);
- } catch (InvalidArgumentException | ParseException | SipException |
- SsrcTransactionNotFoundException e) {
- logger.error("[鏃犱汉瑙傜湅]鍥炴斁锛� 鍙戦�丅YE澶辫触 {}", e.getMessage());
+ if (streamInfoForPlayBackCatch != null ) {
+ if (streamInfoForPlayBackCatch.isPause()) {
+ ret.put("close", false);
+ }else {
+ Device device = deviceService.queryDevice(streamInfoForPlayBackCatch.getDeviceID());
+ if (device != null) {
+ try {
+ cmder.streamByeCmd(device,streamInfoForPlayBackCatch.getChannelId(),
+ streamInfoForPlayBackCatch.getStream(), null);
+ } catch (InvalidArgumentException | ParseException | SipException |
+ SsrcTransactionNotFoundException e) {
+ logger.error("[鏃犱汉瑙傜湅]鍥炴斁锛� 鍙戦�丅YE澶辫触 {}", e.getMessage());
+ }
}
+ redisCatchStorage.stopPlayback(streamInfoForPlayBackCatch.getDeviceID(),
+ streamInfoForPlayBackCatch.getChannelId(), streamInfoForPlayBackCatch.getStream(), null);
}
- redisCatchStorage.stopPlayback(streamInfoForPlayBackCatch.getDeviceID(),
- streamInfoForPlayBackCatch.getChannelId(), streamInfoForPlayBackCatch.getStream(), null);
+
}else {
StreamInfo streamInfoForDownload = redisCatchStorage.queryDownload(null, null, streamId, null);
// 杩涜褰曞儚涓嬭浇鏃舵棤浜鸿鐪嬩笉鏂祦
--
Gitblit v1.8.0