From 348f40017f12a14ebbc96dfe1e5a90441b76982b Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 20 Oct 2015 11:12:45 -0500 Subject: [PATCH] FS-8307 #resolve [Order of codecs can cause loss of RTP stream] --- .../mod_conference/conference_loop.c | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mod/applications/mod_conference/conference_loop.c b/src/mod/applications/mod_conference/conference_loop.c index 162e50cc36..648dc20155 100644 --- a/src/mod/applications/mod_conference/conference_loop.c +++ b/src/mod/applications/mod_conference/conference_loop.c @@ -745,6 +745,18 @@ void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *ob } } + if (switch_channel_test_flag(member->channel, CF_CONFERENCE_RESET_MEDIA)) { + switch_channel_clear_flag(member->channel, CF_CONFERENCE_RESET_MEDIA); + member->loop_loop = 1; + + if (conference_member_setup_media(member, member->conference)) { + switch_mutex_unlock(member->read_mutex); + break; + } + + goto do_continue; + } + if (switch_test_flag(read_frame, SFF_CNG)) { if (member->conference->agc_level) { member->nt_tally++; @@ -945,18 +957,6 @@ void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *ob } } - if (switch_channel_test_flag(member->channel, CF_CONFERENCE_RESET_MEDIA)) { - switch_channel_clear_flag(member->channel, CF_CONFERENCE_RESET_MEDIA); - member->loop_loop = 1; - - if (conference_member_setup_media(member, member->conference)) { - switch_mutex_unlock(member->read_mutex); - break; - } - - goto do_continue; - } - /* skip frames that are not actual media or when we are muted or silent */ if ((conference_utils_member_test_flag(member, MFLAG_TALKING) || member->energy_level == 0 || conference_utils_test_flag(member->conference, CFLAG_AUDIO_ALWAYS)) && conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK) && !conference_utils_test_flag(member->conference, CFLAG_WAIT_MOD)