cond broadcast always. (#2699)

With Read and ReadExtended waiting (they are two different goroutines),
use Broadcast always. In theory, they both should not be waiting at the
same time, but just being safe.
This commit is contained in:
Raja Subramanian
2024-05-10 12:32:28 +05:30
committed by GitHub
parent b54acb0bad
commit 66a3a8e028
+2 -2
View File
@@ -336,14 +336,14 @@ func (b *Buffer) Write(pkt []byte) (n int, err error) {
arrivalTime: now,
})
b.Unlock()
b.readCond.Signal()
b.readCond.Broadcast()
return
}
b.payloadType = rtpPacket.PayloadType
b.calc(pkt, &rtpPacket, time.Now(), false)
b.Unlock()
b.readCond.Signal()
b.readCond.Broadcast()
return
}