From: Anthony Minessale Date: Mon, 18 Jun 2012 15:30:33 +0000 (-0500) Subject: FS-4318 --resolve X-Git-Tag: v1.2.0~290^2~9^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bfda1ecfc5d12f8a1e557eea1570f561da328f5;p=thirdparty%2Ffreeswitch.git FS-4318 --resolve --- diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index c5a05c7fa7..f46b8d935f 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1433,7 +1433,14 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr want_refresh = 0; for (imember = conference->members; imember; imember = imember->next) { - switch_channel_t *ichannel = switch_core_session_get_channel(imember->session); + switch_core_session_t *isession = imember->session; + switch_channel_t *ichannel; + + if (!isession || !switch_core_session_read_lock(isession)) { + continue; + } + + ichannel = switch_core_session_get_channel(imember->session); if (switch_channel_test_flag(ichannel, CF_VIDEO_REFRESH_REQ)) { want_refresh++; @@ -1444,6 +1451,8 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr has_vid++; switch_core_session_write_video_frame(imember->session, vid_frame, SWITCH_IO_FLAG_NONE, 0); } + + switch_core_session_rwunlock(isession); } if (want_refresh) {