提交 4baf0276 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-5513 --resolve

上级 a7be251b
...@@ -144,8 +144,6 @@ typedef struct switch_core_media_params_s { ...@@ -144,8 +144,6 @@ typedef struct switch_core_media_params_s {
char *sdp_username; char *sdp_username;
switch_mutex_t *mutex;
switch_payload_t te; switch_payload_t te;
switch_payload_t recv_te; switch_payload_t recv_te;
......
...@@ -156,7 +156,6 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t * ...@@ -156,7 +156,6 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *
tech_pvt->mparams.extsipip = profile->extsipip; tech_pvt->mparams.extsipip = profile->extsipip;
tech_pvt->mparams.extrtpip = profile->extrtpip; tech_pvt->mparams.extrtpip = profile->extrtpip;
tech_pvt->mparams.local_network = profile->local_network; tech_pvt->mparams.local_network = profile->local_network;
tech_pvt->mparams.mutex = tech_pvt->sofia_mutex;
tech_pvt->mparams.sipip = profile->sipip; tech_pvt->mparams.sipip = profile->sipip;
tech_pvt->mparams.jb_msec = profile->jb_msec; tech_pvt->mparams.jb_msec = profile->jb_msec;
tech_pvt->mparams.rtcp_audio_interval_msec = profile->rtcp_audio_interval_msec; tech_pvt->mparams.rtcp_audio_interval_msec = profile->rtcp_audio_interval_msec;
......
...@@ -174,7 +174,7 @@ struct switch_media_handle_s { ...@@ -174,7 +174,7 @@ struct switch_media_handle_s {
int payload_space; int payload_space;
char *origin; char *origin;
switch_mutex_t *mutex;
const switch_codec_implementation_t *negotiated_codecs[SWITCH_MAX_CODECS]; const switch_codec_implementation_t *negotiated_codecs[SWITCH_MAX_CODECS];
int num_negotiated_codecs; int num_negotiated_codecs;
...@@ -1036,6 +1036,8 @@ SWITCH_DECLARE(switch_status_t) switch_media_handle_create(switch_media_handle_t ...@@ -1036,6 +1036,8 @@ SWITCH_DECLARE(switch_status_t) switch_media_handle_create(switch_media_handle_t
session->media_handle->engines[SWITCH_MEDIA_TYPE_VIDEO].read_frame.buflen = SWITCH_RTP_MAX_BUF_LEN; session->media_handle->engines[SWITCH_MEDIA_TYPE_VIDEO].read_frame.buflen = SWITCH_RTP_MAX_BUF_LEN;
session->media_handle->mparams = params; session->media_handle->mparams = params;
switch_mutex_init(&session->media_handle->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
session->media_handle->engines[SWITCH_MEDIA_TYPE_AUDIO].ssrc = session->media_handle->engines[SWITCH_MEDIA_TYPE_AUDIO].ssrc =
(uint32_t) ((intptr_t) &session->media_handle->engines[SWITCH_MEDIA_TYPE_AUDIO] + (uint32_t) time(NULL)); (uint32_t) ((intptr_t) &session->media_handle->engines[SWITCH_MEDIA_TYPE_AUDIO] + (uint32_t) time(NULL));
...@@ -5022,10 +5024,10 @@ SWITCH_DECLARE(void)switch_core_media_set_local_sdp(switch_core_session_t *sessi ...@@ -5022,10 +5024,10 @@ SWITCH_DECLARE(void)switch_core_media_set_local_sdp(switch_core_session_t *sessi
return; return;
} }
if (smh->mparams->mutex) switch_mutex_lock(smh->mparams->mutex); if (smh->mutex) switch_mutex_lock(smh->mutex);
smh->mparams->local_sdp_str = dup ? switch_core_session_strdup(session, sdp_str) : (char *) sdp_str; smh->mparams->local_sdp_str = dup ? switch_core_session_strdup(session, sdp_str) : (char *) sdp_str;
switch_channel_set_variable(session->channel, "rtp_local_sdp_str", smh->mparams->local_sdp_str); switch_channel_set_variable(session->channel, "rtp_local_sdp_str", smh->mparams->local_sdp_str);
if (smh->mparams->mutex) switch_mutex_unlock(smh->mparams->mutex); if (smh->mutex) switch_mutex_unlock(smh->mutex);
} }
...@@ -6612,7 +6614,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se ...@@ -6612,7 +6614,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
} }
if (smh->mparams->mutex) switch_mutex_lock(smh->mparams->mutex); if (smh->mutex) switch_mutex_lock(smh->mutex);
if (switch_channel_down(session->channel)) { if (switch_channel_down(session->channel)) {
...@@ -6698,7 +6700,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se ...@@ -6698,7 +6700,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
end_lock: end_lock:
if (smh->mparams->mutex) switch_mutex_unlock(smh->mparams->mutex); if (smh->mutex) switch_mutex_unlock(smh->mutex);
end: end:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论