修复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);

View File

@@ -81,7 +81,7 @@ public interface MediaServerMapper {
@Update(value = {" <script>" +
"UPDATE wvp_media_server " +
"SET update_time=#{updateTime}" +
"SET update_time=#{updateTime}, transcode_suffix=#{transcodeSuffix} " +
"<if test=\"ip != null\">, ip=#{ip}</if>" +
"<if test=\"hookIp != null\">, hook_ip=#{hookIp}</if>" +
"<if test=\"sdpIp != null\">, sdp_ip=#{sdpIp}</if>" +
@@ -106,7 +106,6 @@ public interface MediaServerMapper {
"<if test=\"hookAliveInterval != null\">, hook_alive_interval=#{hookAliveInterval}</if>" +
"<if test=\"recordDay != null\">, record_day=#{recordDay}</if>" +
"<if test=\"recordPath != null\">, record_path=#{recordPath}</if>" +
"<if test=\"transcodeSuffix != null\">, transcode_suffix=#{transcodeSuffix}</if>" +
"<if test=\"serverId != null\">, server_id=#{serverId}</if>" +
"<if test=\"type != null\">, type=#{type}</if>" +
"WHERE id=#{id}"+