From c81cc4313a62522c3822a2d88af67a6b2e151cd9 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期日, 26 九月 2021 15:33:00 +0800
Subject: [PATCH] Merge pull request #174 from chenparty/wvp-28181-2.0

---
 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