From 7d3cbb8253ec3dc7f4004ae67371f852727909df Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 24 七月 2023 09:42:32 +0800
Subject: [PATCH] Merge branch 'wvp-28181-2.0' into main-dev

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
index c81e00d..81cae37 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
@@ -86,10 +86,13 @@
         }else {
             param.put("port", port);
         }
-        param.put("ssrc", ssrc);
         if (onlyAuto != null) {
             param.put("only_audio", onlyAuto?"1":"0");
         }
+        if (ssrc != 0) {
+            param.put("ssrc", ssrc);
+        }
+
         JSONObject openRtpServerResultJson = zlmresTfulUtils.openRtpServer(mediaServerItem, param);
         logger.info(JSONObject.toJSONString(openRtpServerResultJson));
         if (openRtpServerResultJson != null) {
@@ -168,7 +171,7 @@
         // 榛樿涓洪殢鏈虹鍙�
         int localPort = 0;
         if (userSetting.getGbSendStreamStrict()) {
-            localPort = sendRtpPortManager.getNextPort(serverItem.getId());
+            localPort = sendRtpPortManager.getNextPort(serverItem);
             if (localPort == 0) {
                 return null;
             }
@@ -204,7 +207,7 @@
         // 榛樿涓洪殢鏈虹鍙�
         int localPort = 0;
         if (userSetting.getGbSendStreamStrict()) {
-            localPort = sendRtpPortManager.getNextPort(serverItem.getId());
+            localPort = sendRtpPortManager.getNextPort(serverItem);
             if (localPort == 0) {
                 return null;
             }

--
Gitblit v1.8.0