Fixed crash.

This commit is contained in:
irungentoo 2014-07-24 21:00:42 -04:00
parent da03feaace
commit 84c28337d2
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -61,8 +61,10 @@ JitterBuffer *create_queue(unsigned int capacity)
static void clear_queue(JitterBuffer *q)
{
for (; q->bottom != q->top; ++q->bottom) {
if (q->queue[q->bottom % q->size])
if (q->queue[q->bottom % q->size]) {
rtp_free_msg(NULL, q->queue[q->bottom % q->size]);
q->queue[q->bottom % q->size] = NULL;
}
}
}