mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 15:22:30 +00:00
Stop writing packets in sysnthesize on track close. (#2086)
This commit is contained in:
1 parent
e0d98eebb6
commit
dd2427bf05
1 file changed
+1
-1
@@ -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