From 7e806aef066ddcc97f90a7cf3a9279018490a57a Mon Sep 17 00:00:00 2001 From: notsecure Date: Thu, 31 Jul 2014 15:35:59 -0400 Subject: fix initialization order --- toxav/toxav.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toxav/toxav.c b/toxav/toxav.c index 219f4d8c..2d2bcd98 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -174,12 +174,12 @@ ToxAv *toxav_new( Tox *messenger, int32_t max_calls) av->calls = calloc(sizeof(CallSpecific), max_calls); av->max_calls = max_calls; - pthread_t temp; - pthread_create(&temp, NULL, toxav_decoding, av); - pthread_mutex_init(&av->decode_cond_mutex, NULL); pthread_cond_init(&av->decode_cond, NULL); + pthread_t temp; + pthread_create(&temp, NULL, toxav_decoding, av); + return av; } -- cgit v1.2.3