summaryrefslogtreecommitdiff
path: root/toxav/rtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/rtp.c')
-rwxr-xr-xtoxav/rtp.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c
index 1e6296b0..8b2768f1 100755
--- a/toxav/rtp.c
+++ b/toxav/rtp.c
@@ -652,36 +652,6 @@ RTPMessage *rtp_new_message ( RTPSession *session, const uint8_t *data, uint32_t
652 652
653 653
654 654
655
656
657
658
659/********************************************************************************************************************
660 ********************************************************************************************************************
661 ********************************************************************************************************************
662 ********************************************************************************************************************
663 ********************************************************************************************************************
664 *
665 *
666 *
667 * PUBLIC API FUNCTIONS IMPLEMENTATIONS
668 *
669 *
670 *
671 ********************************************************************************************************************
672 ********************************************************************************************************************
673 ********************************************************************************************************************
674 ********************************************************************************************************************
675 ********************************************************************************************************************/
676
677
678
679
680
681
682
683
684
685/** 655/**
686 * @brief Release all messages held by session. 656 * @brief Release all messages held by session.
687 * 657 *
@@ -757,6 +727,7 @@ RTPMessage *rtp_recv_msg ( RTPSession *session )
757 pthread_mutex_lock(&session->mutex); 727 pthread_mutex_lock(&session->mutex);
758 728
759 if ( session->queue_size == 0 ) { 729 if ( session->queue_size == 0 ) {
730 pthread_mutex_unlock(&session->mutex);
760 return NULL; 731 return NULL;
761 } 732 }
762 733
@@ -890,12 +861,13 @@ RTPSession *rtp_init_session ( int payload_type,
890 assert(_retu); 861 assert(_retu);
891 862
892 if ( -1 == custom_user_packet_registerhandler(messenger, friend_num, payload_type, rtp_handle_packet, _retu) || 863 if ( -1 == custom_user_packet_registerhandler(messenger, friend_num, payload_type, rtp_handle_packet, _retu) ||
893 !encrypt_key, !decrypt_key, !encrypt_nonce, !decrypt_nonce 864 !encrypt_key || !decrypt_key || !encrypt_nonce || !decrypt_nonce) {
894 ) {
895 LOGGER_ERROR("Error setting custom register handler for rtp session"); 865 LOGGER_ERROR("Error setting custom register handler for rtp session");
896 free(_retu); 866 free(_retu);
897 return NULL; 867 return NULL;
898 } 868 }
869
870 LOGGER_DEBUG("Registered packet handler: pt: %d; fid: %d", payload_type, friend_num);
899 871
900 _retu->version = RTP_VERSION; /* It's always 2 */ 872 _retu->version = RTP_VERSION; /* It's always 2 */
901 _retu->padding = 0; /* If some additional data is needed about the packet */ 873 _retu->padding = 0; /* If some additional data is needed about the packet */