修复推流时存入推流数据的问题

2.7.2
648540858 2024-06-20 22:35:48 +08:00
parent 099c65ff40
commit 050882d6a6
1 changed files with 13 additions and 9 deletions

View File

@ -376,6 +376,7 @@ public class ZLMHttpHookListener {
} }
redisCatchStorage.updateStreamAuthorityInfo(param.getApp(), param.getStream(), streamAuthorityInfo); redisCatchStorage.updateStreamAuthorityInfo(param.getApp(), param.getStream(), streamAuthorityInfo);
if (!"broadcast".equals(param.getApp()) && !"talk".equals(param.getApp())) {
Map<String, String> params = MediaServerUtils.urlParamToMap(param.getParams()); Map<String, String> params = MediaServerUtils.urlParamToMap(param.getParams());
param.setParamMap(params); param.setParamMap(params);
StreamInfo streamInfoByAppAndStream = mediaService.getStreamInfoByAppAndStream(mediaInfo, StreamInfo streamInfoByAppAndStream = mediaService.getStreamInfoByAppAndStream(mediaInfo,
@ -388,6 +389,9 @@ public class ZLMHttpHookListener {
redisCatchStorage.addPushListItem(param.getApp(), param.getStream(), param); redisCatchStorage.addPushListItem(param.getApp(), param.getStream(), param);
} }
} }
}else {
redisCatchStorage.removePushListItem(param.getApp(), param.getStream(), param.getMediaServerId());
}
// TODO 修改为第一个为准 后续不再处理 // TODO 修改为第一个为准 后续不再处理
if ("rtsp".equals(param.getSchema())) { if ("rtsp".equals(param.getSchema())) {
logger.info("流变化:注册->{}, app->{}, stream->{}", param.isRegist(), param.getApp(), param.getStream()); logger.info("流变化:注册->{}, app->{}, stream->{}", param.isRegist(), param.getApp(), param.getStream());