diff --git a/stack/broadcast.go b/stack/broadcast.go index 6c35332..7ac0ae8 100644 --- a/stack/broadcast.go +++ b/stack/broadcast.go @@ -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, } diff --git a/stack/sink.go b/stack/sink.go index faf88f2..6d8eda5 100644 --- a/stack/sink.go +++ b/stack/sink.go @@ -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))