FS-7513: tweak locking on video read callback
This commit is contained in:
parent
a006d53a3d
commit
d2bbd50791
|
@ -2987,6 +2987,11 @@ switch_status_t video_thread_callback(switch_core_session_t *session, switch_fra
|
||||||
|
|
||||||
lock_member(member);
|
lock_member(member);
|
||||||
|
|
||||||
|
if (switch_thread_rwlock_tryrdlock(member->conference->rwlock) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
unlock_member(member);
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
for (rel = member->relationships; rel; rel = rel->next) {
|
for (rel = member->relationships; rel; rel = rel->next) {
|
||||||
conference_member_t *imember;
|
conference_member_t *imember;
|
||||||
if (!(rel->flags & RFLAG_CAN_SEND_VIDEO)) continue;
|
if (!(rel->flags & RFLAG_CAN_SEND_VIDEO)) continue;
|
||||||
|
@ -3011,7 +3016,7 @@ switch_status_t video_thread_callback(switch_core_session_t *session, switch_fra
|
||||||
|
|
||||||
last = rel;
|
last = rel;
|
||||||
}
|
}
|
||||||
unlock_member(member);
|
|
||||||
|
|
||||||
if (member) {
|
if (member) {
|
||||||
if (member->id == member->conference->video_floor_holder) {
|
if (member->id == member->conference->video_floor_holder) {
|
||||||
|
@ -3026,6 +3031,9 @@ switch_status_t video_thread_callback(switch_core_session_t *session, switch_fra
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unlock_member(member);
|
||||||
|
switch_thread_rwlock_unlock(member->conference->rwlock);
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue