Stop writing packets in sysnthesize on track close. (#2086)
This commit is contained in:
@@ -1309,7 +1309,7 @@ func (d *DownTrack) writeBlankFrameRTP(duration float32, generation uint32) chan
|
|||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
if generation != d.blankFramesGeneration.Load() || numFrames <= 0 {
|
if generation != d.blankFramesGeneration.Load() || numFrames <= 0 || !d.writable.Load() || !d.rtpStats.IsActive() {
|
||||||
close(done)
|
close(done)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user