fix: 因sink推流失败, 删除sink时, 拉流计数为负数问题

This commit is contained in:
ydajiang
2025-01-07 20:53:20 +08:00
parent fdf4ec4786
commit 4e62e7edb2
5 changed files with 14 additions and 14 deletions

View File

@@ -147,7 +147,7 @@ func (s *Sink) Close() {
func NewSink(id stream.SinkID, sourceId string, conn net.Conn, cb func(sdp string)) stream.Sink {
return &Sink{
stream.BaseSink{ID: id, SourceID: sourceId, Protocol: stream.TransStreamRtsp, Conn: conn},
stream.BaseSink{ID: id, SourceID: sourceId, State: stream.SessionStateCreated, Protocol: stream.TransStreamRtsp, Conn: conn},
nil,
cb,
}