Skip to content

Commit

Permalink
[mod_conference] Fix memory consumption and Media flow direction issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
andywolk committed Mar 7, 2022
1 parent 4b580a0 commit c460588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mod/applications/mod_conference/mod_conference.c
Original file line number Diff line number Diff line change
Expand Up @@ -2479,9 +2479,13 @@ SWITCH_STANDARD_APP(conference_function)
do {
switch_media_flow_t audio_flow = switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_AUDIO);

if (switch_channel_test_flag(channel, CF_AUDIO) && (audio_flow == SWITCH_MEDIA_FLOW_SENDRECV || audio_flow == SWITCH_MEDIA_FLOW_RECVONLY)) {
if (switch_channel_test_flag(channel, CF_AUDIO) && (audio_flow == SWITCH_MEDIA_FLOW_SENDRECV || audio_flow == SWITCH_MEDIA_FLOW_SENDONLY)) {
conference_loop_output(&member);
} else {
if (!member.input_thread) {
conference_loop_launch_input(&member, switch_core_session_get_pool(member.session));
}

if (conference_utils_member_test_flag((&member), MFLAG_RUNNING) && switch_channel_ready(channel)) {
switch_yield(100000);
member.loop_loop = 1;
Expand Down
1 change: 1 addition & 0 deletions src/mod/applications/mod_conference/mod_conference.h
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thread, void *obj);
void *SWITCH_THREAD_FUNC conference_video_super_muxing_thread_run(switch_thread_t *thread, void *obj);
void conference_loop_output(conference_member_t *member);
void conference_loop_launch_input(conference_member_t *member, switch_memory_pool_t *pool);
uint32_t conference_file_stop(conference_obj_t *conference, file_stop_t stop);
switch_status_t conference_file_play(conference_obj_t *conference, char *file, uint32_t leadin, switch_channel_t *channel, uint8_t async);
void conference_member_send_all_dtmf(conference_member_t *member, conference_obj_t *conference, const char *dtmf);
Expand Down

0 comments on commit c460588

Please sign in to comment.