修复停止推流的参数组织方式

This commit is contained in:
648540858
2022-04-08 16:30:39 +08:00
parent f10b458fc9
commit 81f1b8ee25
3 changed files with 8 additions and 13 deletions

View File

@@ -269,6 +269,11 @@ public class ZLMRESTfulUtils {
param.put("url", url);
param.put("enable_hls", enable_hls?1:0);
param.put("enable_mp4", enable_mp4?1:0);
param.put("enable_rtmp", 1);
param.put("enable_fmp4", 1);
param.put("enable_audio", 1);
param.put("enable_rtsp", 1);
param.put("add_mute_audio", 1);
param.put("rtp_type", rtp_type);
return sendPost(mediaServerItem, "addStreamProxy",param, null);
}

View File

@@ -85,7 +85,7 @@ public class ZLMRTPServerFactory {
int result = -1;
// 查询此rtp server 是否已经存在
JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaServerItem, streamId);
if (rtpInfo.getInteger("code ") == 0 && rtpInfo.getBoolean("exist")) {
if (rtpInfo != null && rtpInfo.getInteger("code") == 0 && rtpInfo.getBoolean("exist")) {
result = rtpInfo.getInteger("local_port");
return result;
}