From 39cc14cceaae74ac5c7e7c1d513eddb745e399c4 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 12 Dec 2014 18:39:39 -0500 Subject: 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. --- toxav/codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toxav/codec.c') diff --git a/toxav/codec.c b/toxav/codec.c index afe4f4aa..a1aa2869 100644 --- a/toxav/codec.c +++ b/toxav/codec.c @@ -133,7 +133,7 @@ static JitterBuffer *jbuf_new(uint32_t capacity) { unsigned int size = 1; - while (size <= capacity) { + while (size <= (capacity * 4)) { size *= 2; } -- cgit v1.2.3