]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4548 --resolve such a little patch for a big problem, good find
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Aug 2012 17:11:17 +0000 (12:11 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Aug 2012 17:11:17 +0000 (12:11 -0500)
src/mod/applications/mod_conference/mod_conference.c
src/switch_rtp.c

index bc600919641230cf667f7faacf60c52af7274d90..cd6ca741e2a4e28acb561191bad4b8c79904f997 100644 (file)
@@ -2209,7 +2209,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
                                        if (x <= file_sample_len) {
                                                main_frame[x] = (int32_t) bptr[x];
                                        } 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 */
                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;
                        void *data;
                        uint32_t datalen;
index 1c23efc714380d9cc5ff99166b81799200259bc4..0b966d8ba2a8dfd7d8ff7be0d3b62caa7dda7e0e 100644 (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)) {
                        *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 */
                }