diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 07a24355cf..57b241c57d 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -2998,14 +2998,14 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th end: - for(;;) { - switch_mutex_lock(member->audio_out_mutex); + while(!no_data) { + switch_mutex_lock(member->audio_out_mutex); if ((rlen = (uint32_t) switch_buffer_read(member->mux_buffer, data_buf, data_buf_len))) { len = (switch_size_t) rlen / sizeof(int16_t); switch_core_file_write(&fh, data_buf, &len); } else { - break; - } + no_data = 1; + } switch_mutex_unlock(member->audio_out_mutex); }