diff options
author | irungentoo <irungentoo@gmail.com> | 2014-12-12 18:39:39 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-12-12 18:39:39 -0500 |
commit | 39cc14cceaae74ac5c7e7c1d513eddb745e399c4 (patch) | |
tree | ebe44b1c2c83d51c62b683c01168e9e5a118f245 /toxav/codec.c | |
parent | 71527c436c1cb8d7fe773a6b84ba7f722f2a47dc (diff) |
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.
Diffstat (limited to 'toxav/codec.c')
-rw-r--r-- | toxav/codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
133 | { | 133 | { |
134 | unsigned int size = 1; | 134 | unsigned int size = 1; |
135 | 135 | ||
136 | while (size <= capacity) { | 136 | while (size <= (capacity * 4)) { |
137 | size *= 2; | 137 | size *= 2; |
138 | } | 138 | } |
139 | 139 | ||