From 458e7d18b77f0f47be2969491b42de9b6d8b27f0 Mon Sep 17 00:00:00 2001 From: lin <18010473990@163.com> Date: 星期五, 07 一月 2022 19:37:05 +0800 Subject: [PATCH] 添加接收redis订阅的GPS消息,为GPS订阅发送到级联平台做准备 --- 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 b4d1048..30a1509 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 @@ -107,8 +107,13 @@ int currentPort = mediaServerItem.getCurrentPort(); if (currentPort == 0) { String[] portRangeStrArray = mediaServerItem.getSendRtpPortRange().split(","); - portRangeArray[0] = Integer.parseInt(portRangeStrArray[0]); - portRangeArray[1] = Integer.parseInt(portRangeStrArray[1]); + if (portRangeStrArray.length != 2) { + portRangeArray[0] = 30000; + portRangeArray[1] = 30500; + }else { + portRangeArray[0] = Integer.parseInt(portRangeStrArray[0]); + portRangeArray[1] = Integer.parseInt(portRangeStrArray[1]); + } } if (currentPort == 0 || currentPort++ > portRangeArray[1]) { -- Gitblit v1.8.0