diff options
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/msi.c | 2 | ||||
-rw-r--r-- | toxav/rtp.c | 9 | ||||
-rw-r--r-- | toxav/toxav.c | 11 |
3 files changed, 15 insertions, 7 deletions
diff --git a/toxav/msi.c b/toxav/msi.c index f8bc8451..d68e4a9c 100644 --- a/toxav/msi.c +++ b/toxav/msi.c | |||
@@ -526,7 +526,7 @@ MSICall *new_call ( MSISession *session, uint32_t friend_number ) | |||
526 | session->calls = tmp; | 526 | session->calls = tmp; |
527 | 527 | ||
528 | /* Set fields in between to null */ | 528 | /* Set fields in between to null */ |
529 | int32_t i = session->calls_tail + 1; | 529 | uint32_t i = session->calls_tail + 1; |
530 | for (; i < friend_number; i ++) | 530 | for (; i < friend_number; i ++) |
531 | session->calls[i] = NULL; | 531 | session->calls[i] = NULL; |
532 | 532 | ||
diff --git a/toxav/rtp.c b/toxav/rtp.c index 2219805b..4ca23d2a 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -243,7 +243,8 @@ int rtp_send_data ( RTPSession *session, const uint8_t *data, uint16_t length, b | |||
243 | uint8_t parsed[MAX_RTP_SIZE]; | 243 | uint8_t parsed[MAX_RTP_SIZE]; |
244 | uint8_t *it; | 244 | uint8_t *it; |
245 | 245 | ||
246 | RTPHeader header[1] = {0}; | 246 | RTPHeader header[1]; |
247 | memset(header, 0, sizeof(header)); | ||
247 | 248 | ||
248 | ADD_FLAG_VERSION ( header, session->version ); | 249 | ADD_FLAG_VERSION ( header, session->version ); |
249 | ADD_FLAG_PADDING ( header, session->padding ); | 250 | ADD_FLAG_PADDING ( header, session->padding ); |
@@ -463,6 +464,9 @@ uint8_t *parse_ext_header_out ( const RTPExtHeader *header, uint8_t *payload ) | |||
463 | } | 464 | } |
464 | int handle_rtp_packet ( Messenger* m, uint32_t friendnumber, const uint8_t* data, uint16_t length, void* object ) | 465 | int handle_rtp_packet ( Messenger* m, uint32_t friendnumber, const uint8_t* data, uint16_t length, void* object ) |
465 | { | 466 | { |
467 | (void) m; | ||
468 | (void) friendnumber; | ||
469 | |||
466 | RTPSession *session = object; | 470 | RTPSession *session = object; |
467 | 471 | ||
468 | if ( !session || length < 13 || length > MAX_RTP_SIZE ) { | 472 | if ( !session || length < 13 || length > MAX_RTP_SIZE ) { |
@@ -553,6 +557,9 @@ int handle_rtp_packet ( Messenger* m, uint32_t friendnumber, const uint8_t* data | |||
553 | } | 557 | } |
554 | int handle_rtcp_packet ( Messenger* m, uint32_t friendnumber, const uint8_t* data, uint16_t length, void* object ) | 558 | int handle_rtcp_packet ( Messenger* m, uint32_t friendnumber, const uint8_t* data, uint16_t length, void* object ) |
555 | { | 559 | { |
560 | (void) m; | ||
561 | (void) friendnumber; | ||
562 | |||
556 | if (length < 9) | 563 | if (length < 9) |
557 | return -1; | 564 | return -1; |
558 | 565 | ||
diff --git a/toxav/toxav.c b/toxav/toxav.c index 25a2857c..e7807592 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -224,7 +224,7 @@ void toxav_iterate(ToxAV* av) | |||
224 | } | 224 | } |
225 | 225 | ||
226 | uint64_t start = current_time_monotonic(); | 226 | uint64_t start = current_time_monotonic(); |
227 | uint32_t rc = 500; | 227 | int32_t rc = 500; |
228 | 228 | ||
229 | ToxAVCall* i = av->calls[av->calls_head]; | 229 | ToxAVCall* i = av->calls[av->calls_head]; |
230 | for (; i; i = i->next) { | 230 | for (; i; i = i->next) { |
@@ -292,7 +292,7 @@ void toxav_iterate(ToxAV* av) | |||
292 | 292 | ||
293 | if (i->msi_call->self_capabilities & msi_CapRVideo && | 293 | if (i->msi_call->self_capabilities & msi_CapRVideo && |
294 | i->msi_call->peer_capabilities & msi_CapSVideo) | 294 | i->msi_call->peer_capabilities & msi_CapSVideo) |
295 | rc = MIN(i->video.second->lcfd, rc); | 295 | rc = MIN(i->video.second->lcfd, (uint32_t) rc); |
296 | 296 | ||
297 | uint32_t fid = i->friend_number; | 297 | uint32_t fid = i->friend_number; |
298 | 298 | ||
@@ -821,7 +821,7 @@ bool toxav_send_video_frame(ToxAV* av, uint32_t friend_number, uint16_t width, u | |||
821 | } | 821 | } |
822 | } | 822 | } |
823 | 823 | ||
824 | if (call->vba.end_time == ~0) | 824 | if (call->vba.end_time == (uint64_t) ~0) |
825 | call->vba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; | 825 | call->vba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; |
826 | } | 826 | } |
827 | 827 | ||
@@ -921,7 +921,7 @@ bool toxav_send_audio_frame(ToxAV* av, uint32_t friend_number, const int16_t* pc | |||
921 | rc = TOXAV_ERR_SEND_FRAME_RTP_FAILED; | 921 | rc = TOXAV_ERR_SEND_FRAME_RTP_FAILED; |
922 | } | 922 | } |
923 | 923 | ||
924 | if (call->aba.end_time == ~0) | 924 | if (call->aba.end_time == (uint64_t) ~0) |
925 | call->aba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; | 925 | call->aba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; |
926 | } | 926 | } |
927 | } | 927 | } |
@@ -1056,6 +1056,7 @@ bool audio_bit_rate_invalid(uint32_t bit_rate) | |||
1056 | 1056 | ||
1057 | bool video_bit_rate_invalid(uint32_t bit_rate) | 1057 | bool video_bit_rate_invalid(uint32_t bit_rate) |
1058 | { | 1058 | { |
1059 | (void) bit_rate; | ||
1059 | /* TODO: If anyone knows the answer to this one please fill it up */ | 1060 | /* TODO: If anyone knows the answer to this one please fill it up */ |
1060 | return false; | 1061 | return false; |
1061 | } | 1062 | } |
@@ -1123,7 +1124,7 @@ ToxAVCall* call_new(ToxAV* av, uint32_t friend_number, TOXAV_ERR_CALL* error) | |||
1123 | av->calls = tmp; | 1124 | av->calls = tmp; |
1124 | 1125 | ||
1125 | /* Set fields in between to null */ | 1126 | /* Set fields in between to null */ |
1126 | int32_t i = av->calls_tail + 1; | 1127 | uint32_t i = av->calls_tail + 1; |
1127 | for (; i < friend_number; i ++) | 1128 | for (; i < friend_number; i ++) |
1128 | av->calls[i] = NULL; | 1129 | av->calls[i] = NULL; |
1129 | 1130 | ||