mirror of
https://github.com/lkmio/gb-cms.git
synced 2025-09-26 19:51:22 +08:00
fix: 删除广播会话失败问题
This commit is contained in:
@@ -40,7 +40,7 @@ func (d *Device) StartBroadcast(streamId common.StreamID, deviceId, channelId st
|
||||
sink := &dao.SinkModel{
|
||||
SinkStreamID: sinkStreamId,
|
||||
StreamID: streamId,
|
||||
Protocol: SourceTypeGBTalk,
|
||||
Protocol: TransStreamGBTalk,
|
||||
CreateTime: time.Now().Unix(),
|
||||
SetupType: common.SetupTypePassive,
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ func (s *Sink) Close(bye, ms bool) {
|
||||
|
||||
// 目前只有一对一对讲, 断开就删除整个websocket对讲流
|
||||
if s.Protocol == TransStreamGBTalk {
|
||||
_, _ = dao.Sink.DeleteSinkBySinkStreamID(s.SinkStreamID)
|
||||
_, _ = dao.Stream.DeleteStream(s.StreamID)
|
||||
// 删除流媒体source
|
||||
_ = MSCloseSource(string(s.StreamID))
|
||||
|
Reference in New Issue
Block a user