修复单端口收流时音频禁用失败的问题

pull/1411/head
648540858 2024-04-09 16:10:02 +08:00
parent 48351c875e
commit de5d025cee
1 changed files with 2 additions and 1 deletions

View File

@ -260,7 +260,6 @@ public class ZLMHttpHookListener {
if ("rtp".equals(param.getApp())) {
InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, param.getStream());
// 单端口模式下修改流 ID
if (!mediaInfo.isRtpEnable() && inviteInfo == null) {
String ssrc = String.format("%010d", Long.parseLong(param.getStream(), 16));
@ -268,6 +267,8 @@ public class ZLMHttpHookListener {
if (inviteInfo != null) {
result.setStream_replace(inviteInfo.getStream());
logger.info("[ZLM HOOK]推流鉴权 stream: {} 替换为 {}", param.getStream(), inviteInfo.getStream());
// 单端口模式下修改流ID为目标流ID不然其他地方可能都无法对应
param.setStream(inviteInfo.getStream());
}
}