Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/switch_rtp.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
* Copyright (C) 2005-2025, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
Expand Down Expand Up @@ -5904,10 +5904,15 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
rtp_session->has_rtp = 0;
rtp_session->has_ice = 0;
rtp_session->has_rtcp = 0;

switch_mutex_lock(rtp_session->ice_mutex);
if (rtp_session->dtls) {
rtp_session->dtls->bytes = 0;
rtp_session->dtls->data = NULL;
}

switch_mutex_unlock(rtp_session->ice_mutex);

memset(&rtp_session->last_rtp_hdr, 0, sizeof(rtp_session->last_rtp_hdr));

if (poll_status == SWITCH_STATUS_SUCCESS) {
Expand All @@ -5927,10 +5932,14 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
}

if ((*b >= 20) && (*b <= 64)) {
switch_mutex_lock(rtp_session->ice_mutex);
if (rtp_session->dtls) {
rtp_session->dtls->bytes = *bytes;
rtp_session->dtls->data = (void *) &rtp_session->recv_msg;
}

switch_mutex_unlock(rtp_session->ice_mutex);

rtp_session->has_ice = 0;
rtp_session->has_rtp = 0;
rtp_session->has_rtcp = 0;
Expand Down
Loading