Commit b079039f818cbb33939a89167ee1853868004d67
1 parent
bf0efc27
修复国标级联上级主动结束时ssrc未释放的问题
Showing
3 changed files
with
5 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -631,6 +631,7 @@ public class SIPCommander implements ISIPCommander { |
| 631 | 631 | streamSession.removeByCallId(ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId(), ssrcTransaction.getCallId()); |
| 632 | 632 | Request byteRequest = headerProvider.createByteRequest(device, channelId, ssrcTransaction.getSipTransactionInfo()); |
| 633 | 633 | sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), byteRequest, null, okEvent); |
| 634 | + | |
| 634 | 635 | } |
| 635 | 636 | } |
| 636 | 637 | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
| ... | ... | @@ -31,7 +31,6 @@ import javax.sip.header.CallIdHeader; |
| 31 | 31 | import javax.sip.message.Response; |
| 32 | 32 | import java.text.ParseException; |
| 33 | 33 | import java.util.HashMap; |
| 34 | -import java.util.List; | |
| 35 | 34 | import java.util.Map; |
| 36 | 35 | |
| 37 | 36 | /** |
| ... | ... | @@ -117,6 +116,9 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In |
| 117 | 116 | redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), |
| 118 | 117 | callIdHeader.getCallId(), null); |
| 119 | 118 | zlmServerFactory.stopSendRtpStream(mediaInfo, param); |
| 119 | + if (userSetting.getUseCustomSsrcForParentInvite()) { | |
| 120 | + mediaServerService.releaseSsrc(mediaInfo.getId(), sendRtpItem.getSsrc()); | |
| 121 | + } | |
| 120 | 122 | if (sendRtpItem.getPlayType().equals(InviteStreamType.PUSH)) { |
| 121 | 123 | ParentPlatform platform = platformService.queryPlatformByServerGBId(sendRtpItem.getPlatformId()); |
| 122 | 124 | if (platform != null) { | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| ... | ... | @@ -447,7 +447,7 @@ public class ZLMHttpHookListener { |
| 447 | 447 | } |
| 448 | 448 | if (!param.isRegist()) { |
| 449 | 449 | List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(param.getStream()); |
| 450 | - if (sendRtpItems.size() > 0) { | |
| 450 | + if (!sendRtpItems.isEmpty()) { | |
| 451 | 451 | for (SendRtpItem sendRtpItem : sendRtpItems) { |
| 452 | 452 | if (sendRtpItem != null && sendRtpItem.getApp().equals(param.getApp())) { |
| 453 | 453 | String platformId = sendRtpItem.getPlatformId(); | ... | ... |