From f760134b39b411495322d2d8bda5dc345aae36d7 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期三, 15 六月 2022 14:19:33 +0800 Subject: [PATCH] Merge pull request #517 from TristingChen/optimize-play-controller --- 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 210aa72..48cdca3 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 @@ -91,10 +91,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