Merge pull request #1647 from kairlec/master

修复当注销流时没有与之关联的国标通道时会出现的NPE
pull/1651/head
648540858 2024-10-15 15:01:24 +08:00 committed by GitHub
commit 0127d712a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -284,7 +284,10 @@ public class StreamPushServiceImpl implements IStreamPushService {
} }
streamPush.setPushing(false); streamPush.setPushing(false);
if (userSetting.isUsePushingAsStatus()) { if (userSetting.isUsePushingAsStatus()) {
gbChannelService.offline(streamPush.buildCommonGBChannel()); CommonGBChannel commonGBChannel = streamPush.buildCommonGBChannel();
if (commonGBChannel != null) {
gbChannelService.offline(commonGBChannel);
}
} }
sendRtpServerService.deleteByStream(streamPush.getStream()); sendRtpServerService.deleteByStream(streamPush.getStream());
mediaServerService.stopSendRtp(mediaServer, streamPush.getApp(), streamPush.getStream(), null); mediaServerService.stopSendRtp(mediaServer, streamPush.getApp(), streamPush.getStream(), null);