diff --git a/incomingstream.go b/incomingstream.go index 91a45b2..6a7329b 100644 --- a/incomingstream.go +++ b/incomingstream.go @@ -3,7 +3,6 @@ package mediaserver import ( "errors" "fmt" - "runtime" "strconv" "strings" "sync" @@ -212,9 +211,9 @@ func (i *IncomingStream) CreateTrack(track *sdp.TrackInfo) *IncomingStreamTrack i.transport.AddIncomingSourceGroup(source) sources[rid] = source - runtime.SetFinalizer(source, func(source native.RTPIncomingSourceGroup) { - i.transport.RemoveIncomingSourceGroup(source) - }) + // runtime.SetFinalizer(source, func(source native.RTPIncomingSourceGroup) { + // i.transport.RemoveIncomingSourceGroup(source) + // }) } } @@ -251,9 +250,9 @@ func (i *IncomingStream) CreateTrack(track *sdp.TrackInfo) *IncomingStreamTrack sources[strconv.Itoa(j)] = source - runtime.SetFinalizer(source, func(source native.RTPIncomingSourceGroup) { - i.transport.RemoveIncomingSourceGroup(source) - }) + // runtime.SetFinalizer(source, func(source native.RTPIncomingSourceGroup) { + // i.transport.RemoveIncomingSourceGroup(source) + // }) } } else { diff --git a/outgoingstream.go b/outgoingstream.go index eac1d43..53d2a90 100644 --- a/outgoingstream.go +++ b/outgoingstream.go @@ -1,7 +1,6 @@ package mediaserver import ( - "runtime" "strings" "sync" @@ -217,9 +216,9 @@ func (o *OutgoingStream) CreateTrack(track *sdp.TrackInfo) *OutgoingStreamTrack outgoingTrack := newOutgoingStreamTrack(track.GetMedia(), track.GetID(), native.TransportToSender(o.transport), source) - runtime.SetFinalizer(source, func(source native.RTPOutgoingSourceGroup) { - o.transport.RemoveOutgoingSourceGroup(source) - }) + // runtime.SetFinalizer(source, func(source native.RTPOutgoingSourceGroup) { + // o.transport.RemoveOutgoingSourceGroup(source) + // }) o.Lock() o.tracks[outgoingTrack.GetID()] = outgoingTrack