mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Make the maximum size of the jbuf at least 4 times the capacity.
Should prevent issues that might occur because a different thread is reading it.
This commit is contained in:
parent
71527c436c
commit
39cc14ccea
|
@ -133,7 +133,7 @@ static JitterBuffer *jbuf_new(uint32_t capacity)
|
|||
{
|
||||
unsigned int size = 1;
|
||||
|
||||
while (size <= capacity) {
|
||||
while (size <= (capacity * 4)) {
|
||||
size *= 2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user