提交 cc61f114 authored 作者: Andrey Volk's avatar Andrey Volk

Revert "FS-11417: [mod_conference] Unbounded memory growth during screen share #resolve"

This reverts commit 143323e6.
上级 4306efff
...@@ -939,10 +939,6 @@ void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *ob ...@@ -939,10 +939,6 @@ void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *ob
goto do_continue; goto do_continue;
} }
if (!switch_channel_test_app_flag(channel, CF_AUDIO)) {
goto do_continue;
}
/* if the member can speak, compute the audio energy level and */ /* if the member can speak, compute the audio energy level and */
/* generate events when the level crosses the threshold */ /* generate events when the level crosses the threshold */
if (((conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK) && !conference_utils_member_test_flag(member, MFLAG_HOLD)) || if (((conference_utils_member_test_flag(member, MFLAG_CAN_SPEAK) && !conference_utils_member_test_flag(member, MFLAG_HOLD)) ||
......
...@@ -611,7 +611,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob ...@@ -611,7 +611,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
for (omember = conference->members; omember; omember = omember->next) { for (omember = conference->members; omember; omember = omember->next) {
switch_size_t ok = 1; switch_size_t ok = 1;
if (!conference_utils_member_test_flag(omember, MFLAG_RUNNING) || !switch_channel_test_flag(omember->channel, CF_AUDIO)) { if (!conference_utils_member_test_flag(omember, MFLAG_RUNNING)) {
continue; continue;
} }
...@@ -667,16 +667,15 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob ...@@ -667,16 +667,15 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
write_frame[x] = (int16_t) z; write_frame[x] = (int16_t) z;
} }
if (switch_channel_test_flag(omember->channel, CF_AUDIO)) {
switch_mutex_lock(omember->audio_out_mutex); switch_mutex_lock(omember->audio_out_mutex);
ok = switch_buffer_write(omember->mux_buffer, write_frame, bytes); ok = switch_buffer_write(omember->mux_buffer, write_frame, bytes);
switch_mutex_unlock(omember->audio_out_mutex); switch_mutex_unlock(omember->audio_out_mutex);
if (!ok) { if (!ok) {
switch_mutex_unlock(conference->mutex); switch_mutex_unlock(conference->mutex);
goto end; goto end;
} }
} }
}
} else { /* There is no source audio. Push silence into all of the buffers */ } else { /* There is no source audio. Push silence into all of the buffers */
int16_t write_frame[SWITCH_RECOMMENDED_BUFFER_SIZE] = { 0 }; int16_t write_frame[SWITCH_RECOMMENDED_BUFFER_SIZE] = { 0 };
...@@ -689,7 +688,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob ...@@ -689,7 +688,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
for (omember = conference->members; omember; omember = omember->next) { for (omember = conference->members; omember; omember = omember->next) {
switch_size_t ok = 1; switch_size_t ok = 1;
if (!conference_utils_member_test_flag(omember, MFLAG_RUNNING) || !switch_channel_test_flag(omember->channel, CF_AUDIO)) { if (!conference_utils_member_test_flag(omember, MFLAG_RUNNING)) {
continue; continue;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论