From ee3e450425f25b07347fe2595a18b7a568f7886d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 2 Feb 2012 18:47:04 -0600 Subject: [PATCH] FS-3869 --resolve --- .../mod_conference/mod_conference.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 2689acb62a..8ba21c5b84 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1257,15 +1257,17 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr } session = conference->floor_holder->session; - switch_core_session_read_lock(session); - switch_mutex_unlock(conference->mutex); - if (!switch_channel_ready(switch_core_session_get_channel(session))) { - status = SWITCH_STATUS_FALSE; - } else { - status = switch_core_session_read_video_frame(session, &vid_frame, SWITCH_IO_FLAG_NONE, 0); + + if ((status = switch_core_session_read_lock(session)) == SWITCH_STATUS_SUCCESS) { + switch_mutex_unlock(conference->mutex); + if (!switch_channel_ready(switch_core_session_get_channel(session))) { + status = SWITCH_STATUS_FALSE; + } else { + status = switch_core_session_read_video_frame(session, &vid_frame, SWITCH_IO_FLAG_NONE, 0); + } + switch_mutex_lock(conference->mutex); + switch_core_session_rwunlock(session); } - switch_mutex_lock(conference->mutex); - switch_core_session_rwunlock(session); if (!SWITCH_READ_ACCEPTABLE(status)) { yield = 100000;