优化多wvp国标级联推流时缓存的清理

This commit is contained in:
648540858
2024-04-17 23:23:42 +08:00
parent 313243195e
commit e85cef4345
3 changed files with 39 additions and 5 deletions

View File

@@ -54,10 +54,7 @@ import javax.sip.header.CallIdHeader;
import javax.sip.message.Response;
import java.text.ParseException;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.Vector;
import java.util.*;
/**
* SIP命令类型 INVITE请求
@@ -589,7 +586,13 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
sendRtpItem.setOnlyAudio(false);
sendRtpItem.setStatus(0);
sendRtpItem.setSessionName(sessionName);
// 清理可能存在的缓存避免用到旧的数据
List<SendRtpItem> sendRtpItemList = redisCatchStorage.querySendRTPServer(platform.getServerGBId(), channelId, gbStream.getStream());
if (!sendRtpItemList.isEmpty()) {
for (SendRtpItem rtpItem : sendRtpItemList) {
redisCatchStorage.deleteSendRTPServer(rtpItem);
}
}
if ("push".equals(gbStream.getStreamType())) {
sendRtpItem.setPlayType(InviteStreamType.PUSH);
if (streamPushItem != null) {