Commit 95642d0bb83759603a837ac9935db63439719898
1 parent
98e6cf5b
优化录像结束发送BYE判断
Showing
1 changed file
with
5 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -657,8 +657,11 @@ public class SIPCommander implements ISIPCommander { |
| 657 | 657 | // 添加流注销的订阅,注销了后向设备发送bye |
| 658 | 658 | subscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_stream_changed, subscribeKey, |
| 659 | 659 | (MediaServerItem mediaServerItemForEnd, JSONObject jsonForEnd)->{ |
| 660 | - logger.info("[录像]下载结束, 发送BYE"); | |
| 661 | - streamByeCmd(device.getDeviceId(), channelId, ssrcInfo.getStream(), callIdHeader.getCallId()); | |
| 660 | + ClientTransaction transaction = streamSession.getTransaction(device.getDeviceId(), channelId, ssrcInfo.getStream(), callIdHeader.getCallId()); | |
| 661 | + if (transaction != null) { | |
| 662 | + logger.info("[录像]下载结束, 发送BYE"); | |
| 663 | + streamByeCmd(device.getDeviceId(), channelId, ssrcInfo.getStream(), callIdHeader.getCallId()); | |
| 664 | + } | |
| 662 | 665 | }); |
| 663 | 666 | }); |
| 664 | 667 | ... | ... |