]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7489 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 24 Jun 2015 21:52:06 +0000 (16:52 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 24 Jun 2015 21:52:30 +0000 (16:52 -0500)
src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c

index 133618632fa7ec7d3e7209290c308f4cc5e0c92f..e349ddfaa9f45147625b491b15b051c409a97dae 100644 (file)
@@ -1476,11 +1476,9 @@ static switch_status_t speech_channel_write(speech_channel_t *schannel, void *da
                return SWITCH_STATUS_FALSE;
        }
 
-       switch_mutex_lock(schannel->mutex);
        if (schannel->state == SPEECH_CHANNEL_PROCESSING) {
                audio_queue_write(schannel->audio_queue, data, len);
        }
-       switch_mutex_unlock(schannel->mutex);
 
        return SWITCH_STATUS_SUCCESS;
 }
@@ -1502,7 +1500,6 @@ static switch_status_t speech_channel_read(speech_channel_t *schannel, void *dat
                return SWITCH_STATUS_FALSE;
        }
 
-       switch_mutex_lock(schannel->mutex);
        switch (schannel->state) {
        case SPEECH_CHANNEL_DONE:
                /* pull any remaining audio - never blocking */
@@ -1518,7 +1515,6 @@ static switch_status_t speech_channel_read(speech_channel_t *schannel, void *dat
        default:
                status = SWITCH_STATUS_BREAK;
        }
-       switch_mutex_unlock(schannel->mutex);
 
        return status;
 }