diff options
author | sudden6 <sudden6@gmx.at> | 2019-08-30 11:29:50 +0200 |
---|---|---|
committer | sudden6 <sudden6@gmx.at> | 2019-11-21 23:46:59 +0100 |
commit | 81728addb23ecff167472e163535557f612975f6 (patch) | |
tree | a96268421096c401b9897f96a9dea9f5a5e88efc | |
parent | 74fc646d45963dd8fc019117766d37249e4ffb82 (diff) |
fix ToxAV mutex released to early
-rw-r--r-- | toxav/toxav.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index 4cdd7d84..27e7ec27 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -283,8 +283,6 @@ void toxav_iterate(ToxAV *av) | |||
283 | } | 283 | } |
284 | } | 284 | } |
285 | 285 | ||
286 | pthread_mutex_unlock(av->mutex); | ||
287 | |||
288 | av->interval = rc < av->dmssa ? 0 : (rc - av->dmssa); | 286 | av->interval = rc < av->dmssa ? 0 : (rc - av->dmssa); |
289 | av->dmsst += current_time_monotonic(av->m->mono_time) - start; | 287 | av->dmsst += current_time_monotonic(av->m->mono_time) - start; |
290 | 288 | ||
@@ -293,6 +291,8 @@ void toxav_iterate(ToxAV *av) | |||
293 | av->dmssc = 0; | 291 | av->dmssc = 0; |
294 | av->dmsst = 0; | 292 | av->dmsst = 0; |
295 | } | 293 | } |
294 | |||
295 | pthread_mutex_unlock(av->mutex); | ||
296 | } | 296 | } |
297 | bool toxav_call(ToxAV *av, uint32_t friend_number, uint32_t audio_bit_rate, uint32_t video_bit_rate, | 297 | bool toxav_call(ToxAV *av, uint32_t friend_number, uint32_t audio_bit_rate, uint32_t video_bit_rate, |
298 | Toxav_Err_Call *error) | 298 | Toxav_Err_Call *error) |