From c21d973977a9f1d00d26179de764687ddd0ec56c Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 24 四月 2024 14:59:41 +0800
Subject: [PATCH] 修复收到catalog消息是更新导致是否有音频的设置失效的BUG

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 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 2422206..b503fab 100755
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
@@ -289,6 +289,10 @@
      * 璋冪敤zlm RESTful API 鈥斺�� stopSendRtp
      */
     public Boolean stopSendRtpStream(MediaServerItem mediaServerItem, Map<String, Object>param) {
+        if (mediaServerItem == null) {
+            logger.error("[鍋滄RTP鎺ㄦ祦] 澶辫触: 濯掍綋鑺傜偣涓篘ULL");
+            return false;
+        }
         Boolean result = false;
         JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaServerItem, param);
         if (jsonObject == null) {
@@ -361,4 +365,13 @@
         }
         return result;
     }
+
+    public JSONObject stopSendRtpStream(MediaServerItem mediaServerItem, SendRtpItem sendRtpItem) {
+        Map<String, Object> param = new HashMap<>();
+        param.put("vhost", "__defaultVhost__");
+        param.put("app", sendRtpItem.getApp());
+        param.put("stream", sendRtpItem.getStream());
+        param.put("ssrc", sendRtpItem.getSsrc());
+        return zlmresTfulUtils.stopSendRtp(mediaServerItem, param);
+    }
 }

--
Gitblit v1.8.0