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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user