Commit deeff5533b2dd30ab7b74ca83bee9a7b39faf1d9
1 parent
457c5e38
添加兼容目录同步兼容性
Showing
2 changed files
with
9 additions
and
6 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
| ... | ... | @@ -380,13 +380,18 @@ public class XmlUtil { |
| 380 | 380 | } |
| 381 | 381 | } |
| 382 | 382 | // 父设备/区域/系统ID |
| 383 | - String realParentId = parentID; | |
| 384 | - if (!ObjectUtils.isEmpty(parentID)) { | |
| 383 | + | |
| 384 | + if (!ObjectUtils.isEmpty(parentID) ) { | |
| 385 | 385 | if (parentID.contains("/")) { |
| 386 | 386 | String[] parentIdArray = parentID.split("/"); |
| 387 | - realParentId = parentIdArray[parentIdArray.length - 1]; | |
| 387 | + deviceChannel.setParentId(parentIdArray[parentIdArray.length - 1]); | |
| 388 | + }else { | |
| 389 | + if (parentID.length()%2 == 0) { | |
| 390 | + deviceChannel.setParentId(parentID); | |
| 391 | + }else { | |
| 392 | + logger.warn("[xml解析] 不规范的parentID:{}, 已舍弃", parentID); | |
| 393 | + } | |
| 388 | 394 | } |
| 389 | - deviceChannel.setParentId(realParentId); | |
| 390 | 395 | }else { |
| 391 | 396 | if (!ObjectUtils.isEmpty(businessGroupID)) { |
| 392 | 397 | deviceChannel.setParentId(businessGroupID); | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| ... | ... | @@ -447,8 +447,6 @@ public class ZLMHttpHookListener { |
| 447 | 447 | if ("rtp".equals(param.getApp())) { |
| 448 | 448 | ret.put("close", userSetting.getStreamOnDemand()); |
| 449 | 449 | // 国标流, 点播/录像回放/录像下载 |
| 450 | -// StreamInfo streamInfoForPlayCatch = redisCatchStorage.queryPlayByStreamId(param.getStream()); | |
| 451 | - | |
| 452 | 450 | InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, param.getStream()); |
| 453 | 451 | // 点播 |
| 454 | 452 | if (inviteInfo != null) { | ... | ... |