Commit 6968839f21fb05bf6e3204c2040ee47130006cd0

Authored by panlinlin
1 parent 418e441d

修复空指针异常

src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
... ... @@ -289,6 +289,10 @@ public class SIPCommander implements ISIPCommander {
289 289 }
290 290 String streamMode = device.getStreamMode().toUpperCase();
291 291 MediaServerConfig mediaInfo = storager.getMediaInfo();
  292 + if (mediaInfo == null) {
  293 + logger.warn("点播时发现ZLM尚未连接...");
  294 + return;
  295 + }
292 296 String mediaPort = null;
293 297 // 使用动态udp端口
294 298 if (rtpEnable) {
... ... @@ -347,8 +351,6 @@ public class SIPCommander implements ISIPCommander {
347 351 storager.updateChannel(device.getDeviceId(), deviceChannel);
348 352 }
349 353  
350   - // TODO 订阅SIP response,处理对方的错误返回
351   -
352 354  
353 355 } catch ( SipException | ParseException | InvalidArgumentException e) {
354 356 e.printStackTrace();
... ...