mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-21 10:53:48 +00:00
FS-8382 #resolve [Segfault with inbound-proxy-media enabled]
This commit is contained in:
parent
8f93fd5590
commit
f6427a5f92
@ -8662,7 +8662,7 @@ SWITCH_DECLARE(void) switch_core_media_patch_sdp(switch_core_session_t *session)
|
|||||||
switch_core_media_choose_port(session, SWITCH_MEDIA_TYPE_VIDEO, 1);
|
switch_core_media_choose_port(session, SWITCH_MEDIA_TYPE_VIDEO, 1);
|
||||||
clear_pmaps(v_engine);
|
clear_pmaps(v_engine);
|
||||||
pmap = switch_core_media_add_payload_map(session,
|
pmap = switch_core_media_add_payload_map(session,
|
||||||
SWITCH_MEDIA_TYPE_AUDIO,
|
SWITCH_MEDIA_TYPE_VIDEO,
|
||||||
"PROXY-VID",
|
"PROXY-VID",
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -8675,11 +8675,15 @@ SWITCH_DECLARE(void) switch_core_media_patch_sdp(switch_core_session_t *session)
|
|||||||
v_engine->cur_payload_map = pmap;
|
v_engine->cur_payload_map = pmap;
|
||||||
|
|
||||||
switch_snprintf(vport_buf, sizeof(vport_buf), "%u", v_engine->adv_sdp_port);
|
switch_snprintf(vport_buf, sizeof(vport_buf), "%u", v_engine->adv_sdp_port);
|
||||||
|
|
||||||
if (switch_channel_media_ready(session->channel) && !switch_rtp_ready(v_engine->rtp_session)) {
|
if (switch_channel_media_ready(session->channel) && !switch_rtp_ready(v_engine->rtp_session)) {
|
||||||
switch_channel_set_flag(session->channel, CF_VIDEO_POSSIBLE);
|
switch_channel_set_flag(session->channel, CF_VIDEO_POSSIBLE);
|
||||||
switch_channel_set_flag(session->channel, CF_REINVITE);
|
switch_channel_set_flag(session->channel, CF_REINVITE);
|
||||||
switch_core_media_activate_rtp(session);
|
switch_core_media_activate_rtp(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v_engine->codec_negotiated = 1;
|
||||||
|
switch_core_media_set_video_codec(session, SWITCH_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(q, p, 8);
|
strncpy(q, p, 8);
|
||||||
|
@ -77,13 +77,14 @@ static void video_bridge_thread(switch_core_session_t *session, void *obj)
|
|||||||
switch_codec_t *b_codec = switch_core_session_get_video_write_codec(vh->session_b);
|
switch_codec_t *b_codec = switch_core_session_get_video_write_codec(vh->session_b);
|
||||||
switch_file_handle_t *fh;
|
switch_file_handle_t *fh;
|
||||||
|
|
||||||
switch_assert(a_codec);
|
|
||||||
switch_assert(b_codec);
|
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) {
|
if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) {
|
||||||
refresh_timer = refresh_cnt;
|
refresh_timer = refresh_cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||||
|
switch_assert(a_codec);
|
||||||
|
switch_assert(b_codec);
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
|
if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
|
||||||
if (a_codec->implementation->impl_id == b_codec->implementation->impl_id && !switch_channel_test_flag(b_channel, CF_VIDEO_DECODED_READ)) {
|
if (a_codec->implementation->impl_id == b_codec->implementation->impl_id && !switch_channel_test_flag(b_channel, CF_VIDEO_DECODED_READ)) {
|
||||||
if (set_decoded_read) {
|
if (set_decoded_read) {
|
||||||
@ -100,6 +101,7 @@ static void video_bridge_thread(switch_core_session_t *session, void *obj)
|
|||||||
refresh_timer = refresh_cnt;
|
refresh_timer = refresh_cnt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (refresh_timer) {
|
if (refresh_timer) {
|
||||||
if (refresh_timer > 0 && (refresh_timer % 100) == 0) {
|
if (refresh_timer > 0 && (refresh_timer % 100) == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user