修复zlm普通版本接入异常

This commit is contained in:
lin
2025-03-21 11:30:05 +08:00
parent a4e810da12
commit a9cf5131e1
3 changed files with 5 additions and 4 deletions

View File

@@ -177,7 +177,7 @@ public class ZLMHttpHookListener {
ret.put("code", 0);
return ret;
}
if (param.getStream().endsWith(mediaInfo.getTranscodeSuffix())) {
if (mediaInfo.getTranscodeSuffix() != null && param.getStream().endsWith(mediaInfo.getTranscodeSuffix())) {
param.setStream(param.getStream().substring(0, param.getStream().lastIndexOf(mediaInfo.getTranscodeSuffix()) - 1));
}
if (!ObjectUtils.isEmpty(mediaInfo.getTranscodeSuffix())

View File

@@ -242,7 +242,9 @@ public class ZLMMediaServerStatusManager {
if (mediaServerItem.getWsFlvSSLPort() == 0) {
mediaServerItem.setWsFlvSSLPort(zlmServerConfig.getHttpSSLport());
}
if (Objects.isNull(mediaServerItem.getTranscodeSuffix())) {
if (Objects.isNull(zlmServerConfig.getTranscodeSuffix())) {
mediaServerItem.setTranscodeSuffix(null);
}else {
mediaServerItem.setTranscodeSuffix(zlmServerConfig.getTranscodeSuffix());
}
mediaServerItem.setHookAliveInterval(10F);