summaryrefslogtreecommitdiff
path: root/toxav
diff options
context:
space:
mode:
authorsudden6 <sudden6@gmx.at>2019-09-06 16:23:25 +0200
committersudden6 <sudden6@gmx.at>2019-11-21 23:47:03 +0100
commitabfd90d25b38581db1e831ba5d1aba35c2d8147a (patch)
tree3134b54ea0965ae3e03e8e9b3f9c83c0007b6cc2 /toxav
parenta29d5805a6e958132f6dbd1b76d4c531c21b986b (diff)
fix log message creating data race
Diffstat (limited to 'toxav')
-rw-r--r--toxav/video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toxav/video.c b/toxav/video.c
index 545d95b6..2550565f 100644
--- a/toxav/video.c
+++ b/toxav/video.c
@@ -318,6 +318,7 @@ void vc_iterate(VCSession *vc)
318 return; 318 return;
319 } 319 }
320 320
321 uint16_t log_rb_size = rb_size(vc->vbuf_raw);
321 pthread_mutex_unlock(vc->queue_mutex); 322 pthread_mutex_unlock(vc->queue_mutex);
322 const struct RTPHeader *const header = &p->header; 323 const struct RTPHeader *const header = &p->header;
323 324
@@ -332,7 +333,7 @@ void vc_iterate(VCSession *vc)
332 } 333 }
333 334
334 LOGGER_DEBUG(vc->log, "vc_iterate: rb_read p->len=%d p->header.xe=%d", (int)full_data_len, p->header.xe); 335 LOGGER_DEBUG(vc->log, "vc_iterate: rb_read p->len=%d p->header.xe=%d", (int)full_data_len, p->header.xe);
335 LOGGER_DEBUG(vc->log, "vc_iterate: rb_read rb size=%d", (int)rb_size(vc->vbuf_raw)); 336 LOGGER_DEBUG(vc->log, "vc_iterate: rb_read rb size=%d", (int)log_rb_size);
336 const vpx_codec_err_t rc = vpx_codec_decode(vc->decoder, p->data, full_data_len, nullptr, MAX_DECODE_TIME_US); 337 const vpx_codec_err_t rc = vpx_codec_decode(vc->decoder, p->data, full_data_len, nullptr, MAX_DECODE_TIME_US);
337 free(p); 338 free(p);
338 339