runaway thread when floor holder has no video and other people do have video

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10576 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-12-03 17:30:56 +00:00
parent c582653bf8
commit 6ea585954f

View File

@ -788,7 +788,11 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
continue;
}
if (switch_channel_test_flag(switch_core_session_get_channel(conference->floor_holder->session), CF_VIDEO)) {
if (!switch_channel_test_flag(switch_core_session_get_channel(conference->floor_holder->session), CF_VIDEO)) {
switch_cond_next();
continue;
}
status = switch_core_session_read_video_frame(conference->floor_holder->session, &vid_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
conference->floor_holder = NULL;
@ -845,7 +849,7 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
}
}
switch_mutex_unlock(conference->member_mutex);
}
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Video thread ending for conference %s\n", conference->name);
conference->video_running = 0;