summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index f7b35934..efc877d6 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -492,7 +492,7 @@ int toxav_prepare_transmission ( ToxAv *av, int32_t call_index, uint32_t jbuf_ca
492 pthread_mutex_init(&call->decode_cond_mutex, NULL); 492 pthread_mutex_init(&call->decode_cond_mutex, NULL);
493 pthread_cond_init(&call->decode_cond, NULL); 493 pthread_cond_init(&call->decode_cond, NULL);
494 494
495 void **arg = malloc(2 * sizeof(void*)); 495 void **arg = malloc(2 * sizeof(void *));
496 arg[0] = av; 496 arg[0] = av;
497 arg[1] = call; 497 arg[1] = call;
498 498
@@ -569,6 +569,7 @@ int toxav_kill_transmission ( ToxAv *av, int32_t call_index )
569 569
570 for (i = 0; i != VIDEO_DECODE_QUEUE_SIZE; i++) { 570 for (i = 0; i != VIDEO_DECODE_QUEUE_SIZE; i++) {
571 p = call->video_decode_queue[i]; 571 p = call->video_decode_queue[i];
572
572 if (p) { 573 if (p) {
573 free(p); 574 free(p);
574 } 575 }
@@ -576,6 +577,7 @@ int toxav_kill_transmission ( ToxAv *av, int32_t call_index )
576 577
577 for (i = 0; i != AUDIO_DECODE_QUEUE_SIZE; i++) { 578 for (i = 0; i != AUDIO_DECODE_QUEUE_SIZE; i++) {
578 p = call->audio_decode_queue[i]; 579 p = call->audio_decode_queue[i];
580
579 if (p) { 581 if (p) {
580 free(p); 582 free(p);
581 } 583 }
@@ -962,9 +964,11 @@ static void *toxav_decoding(void *arg)
962 _Bool video = 0; 964 _Bool video = 0;
963 965
964 pthread_mutex_lock(&call->decode_cond_mutex); 966 pthread_mutex_lock(&call->decode_cond_mutex);
965 if(call->exit) { 967
968 if (call->exit) {
966 break; 969 break;
967 } 970 }
971
968 uint8_t r; 972 uint8_t r;
969 973
970 /* first check for available packets, otherwise wait for condition*/ 974 /* first check for available packets, otherwise wait for condition*/