summaryrefslogtreecommitdiff
path: root/toxav/rtp.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-23 02:22:38 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-24 22:20:22 +0000
commitd3b286cb434ed228e7b62cc70cb293e7a5554bfa (patch)
tree9ab3dd66f9dba2ca861ba8c6e098fb96754aa80b /toxav/rtp.c
parentafc80922e720f5d2a93bdfb3745da058e5ddf81b (diff)
Fix a bunch of compiler warnings and remove suppressions.
Diffstat (limited to 'toxav/rtp.c')
-rw-r--r--toxav/rtp.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c
index c5d940e2..575b1502 100644
--- a/toxav/rtp.c
+++ b/toxav/rtp.c
@@ -694,7 +694,7 @@ void rtp_kill(RTPSession *session)
694 return; 694 return;
695 } 695 }
696 696
697 LOGGER_DEBUG(session->m->log, "Terminated RTP session: %p", session); 697 LOGGER_DEBUG(session->m->log, "Terminated RTP session: %p", (void *)session);
698 rtp_stop_receiving(session); 698 rtp_stop_receiving(session);
699 699
700 LOGGER_DEBUG(session->m->log, "Terminated RTP session V3 work_buffer_list->next_free_entry: %d", 700 LOGGER_DEBUG(session->m->log, "Terminated RTP session V3 work_buffer_list->next_free_entry: %d",
@@ -716,7 +716,7 @@ int rtp_allow_receiving(RTPSession *session)
716 return -1; 716 return -1;
717 } 717 }
718 718
719 LOGGER_DEBUG(session->m->log, "Started receiving on session: %p", session); 719 LOGGER_DEBUG(session->m->log, "Started receiving on session: %p", (void *)session);
720 return 0; 720 return 0;
721} 721}
722 722
@@ -728,7 +728,7 @@ int rtp_stop_receiving(RTPSession *session)
728 728
729 m_callback_rtp_packet(session->m, session->friend_number, session->payload_type, nullptr, nullptr); 729 m_callback_rtp_packet(session->m, session->friend_number, session->payload_type, nullptr, nullptr);
730 730
731 LOGGER_DEBUG(session->m->log, "Stopped receiving on session: %p", session); 731 LOGGER_DEBUG(session->m->log, "Stopped receiving on session: %p", (void *)session);
732 return 0; 732 return 0;
733} 733}
734 734
@@ -744,12 +744,6 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
744 return -1; 744 return -1;
745 } 745 }
746 746
747 uint8_t is_video_payload = 0;
748
749 if (session->payload_type == rtp_TypeVideo) {
750 is_video_payload = 1;
751 }
752
753 struct RTPHeader header = {0}; 747 struct RTPHeader header = {0};
754 748
755 header.ve = 2; // this is unused in toxav 749 header.ve = 2; // this is unused in toxav
@@ -805,7 +799,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
805 memcpy(rdata + 1 + RTP_HEADER_SIZE, data, length); 799 memcpy(rdata + 1 + RTP_HEADER_SIZE, data, length);
806 800
807 if (-1 == m_send_custom_lossy_packet(session->m, session->friend_number, rdata, SIZEOF_VLA(rdata))) { 801 if (-1 == m_send_custom_lossy_packet(session->m, session->friend_number, rdata, SIZEOF_VLA(rdata))) {
808 LOGGER_WARNING(session->m->log, "RTP send failed (len: %d)! std error: %s", SIZEOF_VLA(rdata), strerror(errno)); 802 LOGGER_WARNING(session->m->log, "RTP send failed (len: %zu)! std error: %s", SIZEOF_VLA(rdata), strerror(errno));
809 } 803 }
810 } else { 804 } else {
811 /** 805 /**