diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 7242f03557..14df48212a 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -4512,9 +4512,9 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v int16_t *bptr = (int16_t *) read_frame->data; int len = (int) read_frame->datalen; - switch_resample_process(read_resampler, bptr, len / 2 / member->conference->channels); - memcpy(member->resample_out, read_resampler->to, read_resampler->to_len * 2 * member->conference->channels); - len = read_resampler->to_len * 2 * member->conference->channels; + switch_resample_process(read_resampler, bptr, len / 2 / member->read_impl.number_of_channels); + memcpy(member->resample_out, read_resampler->to, read_resampler->to_len * 2 * member->read_impl.number_of_channels); + len = read_resampler->to_len * 2 * member->read_impl.number_of_channels; datalen = len; data = member->resample_out; } else { @@ -8942,7 +8942,7 @@ static int setup_media(conference_member_t *member, conference_obj_t *conference if (read_impl.actual_samples_per_second != conference->rate) { if (switch_resample_create(&member->read_resampler, read_impl.actual_samples_per_second, - conference->rate, member->frame_size, SWITCH_RESAMPLE_QUALITY, conference->channels) != SWITCH_STATUS_SUCCESS) { + conference->rate, member->frame_size, SWITCH_RESAMPLE_QUALITY, read_impl.number_of_channels) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Unable to create resampler!\n"); goto done; }