summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotsecure <notsecure@marek.ca>2014-07-31 15:35:59 -0400
committernotsecure <notsecure@marek.ca>2014-07-31 15:35:59 -0400
commit7e806aef066ddcc97f90a7cf3a9279018490a57a (patch)
tree079184016bc282fc7c9b34df2970e662f3a38b4c
parentc0a7cbbf7388c1e4881cc4bd054e679760fa7c51 (diff)
fix initialization order
-rw-r--r--toxav/toxav.c6
1 files 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)
174 av->calls = calloc(sizeof(CallSpecific), max_calls); 174 av->calls = calloc(sizeof(CallSpecific), max_calls);
175 av->max_calls = max_calls; 175 av->max_calls = max_calls;
176 176
177 pthread_t temp;
178 pthread_create(&temp, NULL, toxav_decoding, av);
179
180 pthread_mutex_init(&av->decode_cond_mutex, NULL); 177 pthread_mutex_init(&av->decode_cond_mutex, NULL);
181 pthread_cond_init(&av->decode_cond, NULL); 178 pthread_cond_init(&av->decode_cond, NULL);
182 179
180 pthread_t temp;
181 pthread_create(&temp, NULL, toxav_decoding, av);
182
183 return av; 183 return av;
184} 184}
185 185