diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index c88abf2f6b..4eda631557 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1230,7 +1230,6 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr int yield = 0; uint32_t last_member = 0; switch_core_session_t *session; - switch_channel_t *channel; switch_core_session_message_t msg = { 0 }; conference->video_running = 1; @@ -1258,7 +1257,6 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr goto do_continue; } - channel = NULL; session = conference->floor_holder->session; switch_core_session_read_lock(session); switch_mutex_unlock(conference->member_mutex); @@ -1271,8 +1269,6 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr goto do_continue; } - channel = switch_core_session_get_channel(session); - if (conference->floor_holder->id != last_member) { int iframe = 0; @@ -1315,17 +1311,10 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr if (imember->session && switch_channel_test_flag(ichannel, CF_VIDEO)) { has_vid++; - if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) { - switch_core_session_receive_message(imember->session, &msg); - } switch_core_session_write_video_frame(imember->session, vid_frame, SWITCH_IO_FLAG_NONE, 0); } } - if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) { - switch_channel_clear_flag(channel, CF_VIDEO_REFRESH_REQ); - } - if (want_refresh) { switch_core_session_receive_message(session, &msg); want_refresh = 0; diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 822c6b85b6..00d291f8db 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -7137,11 +7137,13 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t if (!strncasecmp(sip->sip_content_type->c_type, "application", 11) && !strcasecmp(sip->sip_content_type->c_subtype, "media_control+xml")) { switch_core_session_t *other_session; - switch_channel_set_flag(channel, CF_VIDEO_REFRESH_REQ); - - if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) { - sofia_glue_build_vid_refresh_message(other_session, sip->sip_payload->pl_data); - switch_core_session_rwunlock(other_session); + if (switch_channel_test_flag(channel, CF_VIDEO)) { + if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) { + sofia_glue_build_vid_refresh_message(other_session, sip->sip_payload->pl_data); + switch_core_session_rwunlock(other_session); + } else { + switch_channel_set_flag(channel, CF_VIDEO_REFRESH_REQ); + } } } else if (!strncasecmp(sip->sip_content_type->c_type, "application", 11) && !strcasecmp(sip->sip_content_type->c_subtype, "dtmf-relay")) {