summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-07-24 21:00:42 -0400
committerirungentoo <irungentoo@gmail.com>2014-07-24 21:00:42 -0400
commit84c28337d248bad2319b5c001108b198dbd6bc5c (patch)
tree7b2848abf998e58f6c3019a4af0e6c6beb30ec51
parentda03feaaced60e251006992e790abc8c00911826 (diff)
Fixed crash.
-rw-r--r--toxav/codec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toxav/codec.c b/toxav/codec.c
index 448edd4c..1e8478bb 100644
--- a/toxav/codec.c
+++ b/toxav/codec.c
@@ -61,8 +61,10 @@ JitterBuffer *create_queue(unsigned int capacity)
61static void clear_queue(JitterBuffer *q) 61static void clear_queue(JitterBuffer *q)
62{ 62{
63 for (; q->bottom != q->top; ++q->bottom) { 63 for (; q->bottom != q->top; ++q->bottom) {
64 if (q->queue[q->bottom % q->size]) 64 if (q->queue[q->bottom % q->size]) {
65 rtp_free_msg(NULL, q->queue[q->bottom % q->size]); 65 rtp_free_msg(NULL, q->queue[q->bottom % q->size]);
66 q->queue[q->bottom % q->size] = NULL;
67 }
66 } 68 }
67} 69}
68 70