fix initialization order

This commit is contained in:
notsecure 2014-07-31 15:35:59 -04:00
parent c0a7cbbf73
commit 7e806aef06

View File

@ -174,12 +174,12 @@ ToxAv *toxav_new( Tox *messenger, int32_t max_calls)
av->calls = calloc(sizeof(CallSpecific), max_calls); av->calls = calloc(sizeof(CallSpecific), max_calls);
av->max_calls = 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_mutex_init(&av->decode_cond_mutex, NULL);
pthread_cond_init(&av->decode_cond, NULL); pthread_cond_init(&av->decode_cond, NULL);
pthread_t temp;
pthread_create(&temp, NULL, toxav_decoding, av);
return av; return av;
} }