From 0e826e3448a21bcb68f52b3e87ecb00d3070d977 Mon Sep 17 00:00:00 2001 From: chenjialing <595168663@qq.com> Date: 星期三, 15 六月 2022 14:14:29 +0800 Subject: [PATCH] 优化--端口获取失败之时(如zlm连接失败),不进行invite点播消息的发送 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java index bd3dcb1..77c5de6 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java @@ -87,10 +87,15 @@ int result = -1; // 鏌ヨ姝tp server 鏄惁宸茬粡瀛樺湪 JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaServerItem, streamId); - if (rtpInfo != null && rtpInfo.getInteger("code") == 0 && rtpInfo.getBoolean("exist")) { - result = rtpInfo.getInteger("local_port"); + if(rtpInfo.getInteger("code") == 0){ + if (rtpInfo.getBoolean("exist")) { + result = rtpInfo.getInteger("local_port"); + return result; + } + }else if(rtpInfo.getInteger("code") == -2){ return result; } + Map<String, Object> param = new HashMap<>(); // 鎺ㄦ祦绔彛璁剧疆0鍒欎娇鐢ㄩ殢鏈虹鍙� param.put("enable_tcp", 1); -- Gitblit v1.8.0