修复大华对讲talk模式

This commit is contained in:
648540858
2024-11-27 10:11:49 +08:00
parent 6136603b3f
commit f625fb6aed
9 changed files with 57 additions and 82 deletions

View File

@@ -517,7 +517,14 @@ public class PlayServiceImpl implements IPlayService {
}, userSetting.getPlayTimeout());
try {
mediaServerService.startSendRtpPassive(mediaServerItem, sendRtpInfo, userSetting.getPlayTimeout() * 1000);
Integer localPort = mediaServerService.startSendRtpPassive(mediaServerItem, sendRtpInfo, userSetting.getPlayTimeout() * 1000);
if (localPort == null || localPort <= 0) {
timeoutCallback.run();
mediaServerService.releaseSsrc(mediaServerItem.getId(), sendRtpInfo.getSsrc());
sessionManager.removeByStream(sendRtpInfo.getStream());
return;
}
sendRtpInfo.setPort(localPort);
}catch (ControllerException e) {
mediaServerService.releaseSsrc(mediaServerItem.getId(), sendRtpInfo.getSsrc());
log.info("[语音对讲]失败 deviceId: {}, channelId: {}", device.getDeviceId(), channel.getDeviceId());