648540858
2023-06-08 03f35986818c86436a703493b7ac1147ce0e62fd
修复stream-on-demand配置失效的BUG
1个文件已修改
14 ■■■■■ 已修改文件
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -451,11 +451,6 @@
            InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, param.getStream());
            // 点播
            if (inviteInfo != null) {
                // 录像下载
                if (inviteInfo.getType() == InviteSessionType.DOWNLOAD) {
                    ret.put("close", false);
                    return ret;
                }
                // 收到无人观看说明流也没有在往上级推送
                if (redisCatchStorage.isChannelSendingRTP(inviteInfo.getChannelId())) {
                    List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByChnnelId(
@@ -473,6 +468,14 @@
                        }
                    }
                }
                if (userSetting.getStreamOnDemand()) {
                    // 录像下载
                    if (inviteInfo.getType() == InviteSessionType.DOWNLOAD) {
                        ret.put("close", false);
                        return ret;
                    }
                Device device = deviceService.getDevice(inviteInfo.getDeviceId());
                if (device != null) {
                    try {
@@ -489,6 +492,7 @@
                inviteStreamService.removeInviteInfo(inviteInfo.getType(), inviteInfo.getDeviceId(),
                        inviteInfo.getChannelId(), inviteInfo.getStream());
                storager.stopPlay(inviteInfo.getDeviceId(), inviteInfo.getChannelId());
                }
                return ret;
            }
        } else {