mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Jbuff fixes.
This commit is contained in:
parent
e254c4fe3e
commit
1c3f88758d
|
@ -178,7 +178,7 @@ static void jbuf_write(JitterBuffer *q, RTPMessage *m)
|
|||
|
||||
if ((uint32_t)(sequnum - q->bottom) > q->size) {
|
||||
jbuf_clear(q);
|
||||
q->bottom = sequnum;
|
||||
q->bottom = sequnum - q->capacity;
|
||||
q->queue[num] = m;
|
||||
q->top = sequnum + 1;
|
||||
return;
|
||||
|
@ -191,6 +191,7 @@ static void jbuf_write(JitterBuffer *q, RTPMessage *m)
|
|||
|
||||
if ((sequnum - q->bottom) >= (q->top - q->bottom))
|
||||
q->top = sequnum + 1;
|
||||
|
||||
}
|
||||
|
||||
/* Success is 0 when there is nothing to dequeue,
|
||||
|
|
Loading…
Reference in New Issue
Block a user