From f00ae2b43deb24b841c0e5921b74d182ff8f69c5 Mon Sep 17 00:00:00 2001 From: lin <648540858@qq.com> Date: Sat, 21 Feb 2026 23:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtalk=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=AF=B9=E8=AE=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/media/zlm/ZLMRESTfulUtils.java | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java index 03a56b63b..8fd650d7f 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java @@ -509,21 +509,25 @@ public class ZLMRESTfulUtils { } public ZLMResult startSendRtpPassive(MediaServer mediaServer, Map param, ResultCallback callback) { - String response = sendPost(mediaServer, "startSendRtpPassive",param, (responseStr -> { - if (callback == null) { - return; - } - if (responseStr == null) { - callback.run(ZLMResult.getFailForMediaServer()); - }else { - ZLMResult zlmResult = JSON.parseObject(responseStr, ZLMResult.class); - if (zlmResult == null) { + RequestCallback requestCallback = null; + if (callback != null) { + requestCallback = (responseStr -> { + if (callback == null) { + return; + } + if (responseStr == null) { callback.run(ZLMResult.getFailForMediaServer()); }else { - callback.run(zlmResult); + ZLMResult zlmResult = JSON.parseObject(responseStr, ZLMResult.class); + if (zlmResult == null) { + callback.run(ZLMResult.getFailForMediaServer()); + }else { + callback.run(zlmResult); + } } - } - })); + }); + } + String response = sendPost(mediaServer, "startSendRtpPassive",param, requestCallback); if (response == null) { return ZLMResult.getFailForMediaServer(); }else {