avoiding racelock

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7624 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-02-15 19:48:16 +00:00
1 parent dd1c14cfa8
commit 1f3edc49dc
3 files changed
+16 -17

No files matched your search

+5 -5
View File
@@ -1084,6 +1084,11 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
{
int ms;
if (!tech_pvt->iananame) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No audio codec available\n");
return SWITCH_STATUS_FALSE;
}
if (tech_pvt->read_codec.implementation) {
if (!force) {
return SWITCH_STATUS_SUCCESS;
@@ -1102,11 +1107,6 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
}
}
if (!tech_pvt->iananame) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec with no name?\n");
return SWITCH_STATUS_FALSE;
}
if (switch_core_codec_init(&tech_pvt->read_codec,
tech_pvt->iananame,
tech_pvt->rm_fmtp,