From 260bf885e142a2664575d75a77e3c8c992930cfd Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 6 Feb 2008 23:25:18 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7537 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../applications/mod_conference/mod_conference.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index d6a3664fe6..53dca94fc0 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -841,7 +841,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t * thread, break; } switch_mutex_lock(conference->mutex); - ready = total = 0; + ready = has_file_data = total = 0; /* Read one frame of audio from each member channel and save it for redistribution */ for (imember = conference->members; imember; imember = imember->next) { @@ -891,14 +891,12 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t * thread, if (file_sample_len <= 0) { conference->fnode->done++; + } else { + has_file_data = 1; } - } - has_file_data = 1; - ready++; - } else { - has_file_data = 0; + } } - + if (conference->async_fnode) { /* Lead in time */ if (conference->async_fnode->leadin) { @@ -924,13 +922,12 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t * thread, } else { memcpy(file_frame, async_file_frame, file_sample_len * 2); has_file_data = 1; - ready++; } } } } - if (ready) { + if (ready || has_file_data) { int nt = 0; /* Build a muxed frame for every member that contains the mixed audio of everyone else */ for (omember = conference->members; omember; omember = omember->next) {