mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
FS-7500: ping video thread on shutdown so it can end
This commit is contained in:
parent
afc67e517b
commit
2f0f408984
@ -5311,6 +5311,10 @@ SWITCH_DECLARE(void) switch_core_session_wake_video_thread(switch_core_session_t
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!v_engine->media_thread) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!v_engine->mh.cond_mutex) {
|
if (!v_engine->mh.cond_mutex) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Channel %s has no cond?\n",
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Channel %s has no cond?\n",
|
||||||
switch_channel_get_name(session->channel));
|
switch_channel_get_name(session->channel));
|
||||||
|
@ -501,6 +501,9 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
|||||||
case CS_HANGUP: /* Deactivate and end the thread */
|
case CS_HANGUP: /* Deactivate and end the thread */
|
||||||
{
|
{
|
||||||
switch_core_session_hangup_state(session, SWITCH_TRUE);
|
switch_core_session_hangup_state(session, SWITCH_TRUE);
|
||||||
|
if (switch_channel_test_flag(session->channel, CF_VIDEO)) {
|
||||||
|
switch_core_session_wake_video_thread(session);
|
||||||
|
}
|
||||||
switch_channel_set_state(session->channel, CS_REPORTING);
|
switch_channel_set_state(session->channel, CS_REPORTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user