try to improve audio stream sync

This commit is contained in:
Anthony Minessale
2012-11-28 23:12:35 -06:00
parent f1a89fb016
commit d4f8a79299
7 changed files with 62 additions and 33 deletions
+11 -1
View File
@@ -1565,7 +1565,17 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
if (switch_core_session_in_thread(session)) {
de->session = session;
}
sofia_process_dispatch_event(&de);
if (de->data->e_event == nua_i_cancel || de->data->e_event == nua_i_bye) {
sofia_set_flag(tech_pvt, TFLAG_SIGDEAD);
}
if (!sofia_test_flag(tech_pvt, TFLAG_SIGDEAD) && (switch_channel_media_up(channel) || switch_channel_get_state(channel) > CS_ROUTING)) {
sofia_queue_message(de);
} else {
sofia_process_dispatch_event(&de);
}
switch_mutex_unlock(tech_pvt->sofia_mutex);
goto end;
}