diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-22 00:42:14 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-25 01:58:51 +0100 |
commit | d369448ace7ab9b77b6f0e644fdb42ff8dc9a31d (patch) | |
tree | 7b0435adf621698cb8698c464b7140776cf6b739 /toxav/ring_buffer.c | |
parent | f60900c4b813abbce213db6de217837645c6590e (diff) |
Work around bug in opencv3 headers.
OpenCV 3.1 doesn't define cvRound in C, only in C++. Thus, we now need
to compile av_test as C++ code.
Diffstat (limited to 'toxav/ring_buffer.c')
-rw-r--r-- | toxav/ring_buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxav/ring_buffer.c b/toxav/ring_buffer.c index cef3e943..94091c54 100644 --- a/toxav/ring_buffer.c +++ b/toxav/ring_buffer.c | |||
@@ -47,7 +47,7 @@ bool rb_read(RingBuffer *b, void **p) | |||
47 | } | 47 | } |
48 | RingBuffer *rb_new(int size) | 48 | RingBuffer *rb_new(int size) |
49 | { | 49 | { |
50 | RingBuffer *buf = calloc(sizeof(RingBuffer), 1); | 50 | RingBuffer *buf = (RingBuffer *)calloc(sizeof(RingBuffer), 1); |
51 | 51 | ||
52 | if (!buf) { | 52 | if (!buf) { |
53 | return NULL; | 53 | return NULL; |
@@ -55,7 +55,7 @@ RingBuffer *rb_new(int size) | |||
55 | 55 | ||
56 | buf->size = size + 1; /* include empty elem */ | 56 | buf->size = size + 1; /* include empty elem */ |
57 | 57 | ||
58 | if (!(buf->data = calloc(buf->size, sizeof(void *)))) { | 58 | if (!(buf->data = (void **)calloc(buf->size, sizeof(void *)))) { |
59 | free(buf); | 59 | free(buf); |
60 | return NULL; | 60 | return NULL; |
61 | } | 61 | } |