Commit 29ef68038de85180110eecc337b41b26ad5ae7d4

Authored by 648540858
1 parent db24f492

优化拉流代理中关于ffmpeg.cmd的判断

src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
@@ -132,6 +132,9 @@ public class StreamProxyServiceImpl implements IStreamProxyService { @@ -132,6 +132,9 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
132 } 132 }
133 JSONArray dataArray = jsonObject.getJSONArray("data"); 133 JSONArray dataArray = jsonObject.getJSONArray("data");
134 JSONObject mediaServerConfig = dataArray.getJSONObject(0); 134 JSONObject mediaServerConfig = dataArray.getJSONObject(0);
  135 + if (ObjectUtils.isEmpty(param.getFfmpegCmdKey())) {
  136 + param.setFfmpegCmdKey("ffmpeg.cmd");
  137 + }
135 String ffmpegCmd = mediaServerConfig.getString(param.getFfmpegCmdKey()); 138 String ffmpegCmd = mediaServerConfig.getString(param.getFfmpegCmdKey());
136 if (ffmpegCmd == null) { 139 if (ffmpegCmd == null) {
137 throw new ControllerException(ErrorCode.ERROR100.getCode(), "ffmpeg拉流代理无法获取ffmpeg cmd"); 140 throw new ControllerException(ErrorCode.ERROR100.getCode(), "ffmpeg拉流代理无法获取ffmpeg cmd");