From 62e82ea9ee6a73cf7cdcfe1ab1a7b49a23f571e3 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 15 十月 2021 17:58:28 +0800
Subject: [PATCH] 录像下载修复

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 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 678a56e..ad37cd8 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
@@ -377,16 +377,16 @@
 			String streamId = json.getString("stream");
 			if ("rtp".equals(app)) {
 				String[] s = streamId.split("_");
-				if (s.length == 4) {
-					String deviceId = s[2];
-					String channelId = s[3];
+				if (s.length == 2) {
+					String deviceId = s[0];
+					String channelId = s[1];
 					Device device = storager.queryVideoDevice(deviceId);
 					if (device != null) {
 						UUID uuid = UUID.randomUUID();
 						SSRCInfo ssrcInfo;
 						String streamId2 = null;
 						if (mediaInfo.isRtpEnable()) {
-							streamId2 = String.format("%s/%s", device.getDeviceId(), channelId);
+							streamId2 = String.format("%s_%s", device.getDeviceId(), channelId);
 						}
 						ssrcInfo = mediaServerService.openRTPServer(mediaInfo, streamId2);
 						cmder.playStreamCmd(mediaInfo, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInuse, JSONObject response) -> {

--
Gitblit v1.8.0