FS-4548 --resolve such a little patch for a big problem, good find

This commit is contained in:
Anthony Minessale 2012-08-20 12:11:17 -05:00 committed by Ken Rice
parent 49baa45c48
commit 8da367d9a1
2 changed files with 4 additions and 2 deletions

View File

@ -2209,7 +2209,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
if (x <= file_sample_len) { if (x <= file_sample_len) {
main_frame[x] = (int32_t) bptr[x]; main_frame[x] = (int32_t) bptr[x];
} else { } else {
main_frame[x] = 255; memset(&main_frame[x], 255, sizeof(main_frame[x]));
} }
} }
} }
@ -3279,7 +3279,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
/* skip frames that are not actual media or when we are muted or silent */ /* skip frames that are not actual media or when we are muted or silent */
if ((switch_test_flag(member, MFLAG_TALKING) || member->energy_level == 0 || switch_test_flag(member->conference, CFLAG_AUDIO_ALWAYS)) if ((switch_test_flag(member, MFLAG_TALKING) || member->energy_level == 0 || switch_test_flag(member->conference, CFLAG_AUDIO_ALWAYS))
&& switch_test_flag(member, MFLAG_CAN_SPEAK) && !switch_test_flag(member->conference, CFLAG_WAIT_MOD)) { && switch_test_flag(member, MFLAG_CAN_SPEAK) && !switch_test_flag(member->conference, CFLAG_WAIT_MOD) && member->conference->count > 1) {
switch_audio_resampler_t *read_resampler = member->read_resampler; switch_audio_resampler_t *read_resampler = member->read_resampler;
void *data; void *data;
uint32_t datalen; uint32_t datalen;

View File

@ -3545,6 +3545,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if (((rtp_session->cng_pt && rtp_session->recv_msg.header.pt == rtp_session->cng_pt) || rtp_session->recv_msg.header.pt == 13)) { if (((rtp_session->cng_pt && rtp_session->recv_msg.header.pt == rtp_session->cng_pt) || rtp_session->recv_msg.header.pt == 13)) {
*flags |= SFF_NOT_AUDIO; *flags |= SFF_NOT_AUDIO;
} else {
*flags &= ~SFF_NOT_AUDIO; /* If this flag was already set, make sure to remove it when we get real audio */
} }