Merge pull request #2273 from asymptotic-io/mod-conference-fix
[mod_conference] Avoid a race in member->read_impl access
This commit is contained in:
commit
11048483d3
|
@ -1316,15 +1316,15 @@ void conference_loop_output(conference_member_t *member)
|
||||||
uint32_t flush_len;
|
uint32_t flush_len;
|
||||||
uint32_t low_count, bytes;
|
uint32_t low_count, bytes;
|
||||||
call_list_t *call_list, *cp;
|
call_list_t *call_list, *cp;
|
||||||
switch_codec_implementation_t read_impl = { 0 }, real_read_impl = { 0 };
|
switch_codec_implementation_t real_read_impl = { 0 };
|
||||||
int sanity;
|
int sanity;
|
||||||
|
|
||||||
switch_core_session_get_read_impl(member->session, &read_impl);
|
switch_core_session_get_read_impl(member->session, &member->read_impl);
|
||||||
switch_core_session_get_real_read_impl(member->session, &real_read_impl);
|
switch_core_session_get_real_read_impl(member->session, &real_read_impl);
|
||||||
|
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(member->session);
|
channel = switch_core_session_get_channel(member->session);
|
||||||
interval = read_impl.microseconds_per_packet / 1000;
|
interval = member->read_impl.microseconds_per_packet / 1000;
|
||||||
samples = switch_samples_per_packet(member->conference->rate, interval);
|
samples = switch_samples_per_packet(member->conference->rate, interval);
|
||||||
//csamples = samples;
|
//csamples = samples;
|
||||||
tsamples = real_read_impl.samples_per_packet;
|
tsamples = real_read_impl.samples_per_packet;
|
||||||
|
|
Loading…
Reference in New Issue