mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 11:44:43 +00:00
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()
|
||||
|
||||
for {
|
||||
if generation != d.blankFramesGeneration.Load() || numFrames <= 0 {
|
||||
if generation != d.blankFramesGeneration.Load() || numFrames <= 0 || !d.writable.Load() || !d.rtpStats.IsActive() {
|
||||
close(done)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user