FSCORE-510

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15896 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-12-11 02:24:41 +00:00
parent 2ca3c17e90
commit b71a3176ba
1 changed files with 15 additions and 15 deletions

View File

@ -1553,6 +1553,7 @@ static switch_bool_t inband_dtmf_generate_callback(switch_media_bug_t *bug, void
frame = switch_core_media_bug_get_write_replace_frame(bug);
}
if (!switch_buffer_inuse(pvt->audio_buffer)) {
while (switch_queue_trypop(pvt->digit_queue, &pop) == SWITCH_STATUS_SUCCESS) {
switch_dtmf_t *dtmf = (switch_dtmf_t *) pop;
char buf[2] = "";
@ -1568,8 +1569,7 @@ static switch_bool_t inband_dtmf_generate_callback(switch_media_bug_t *bug, void
teletone_run(&pvt->ts, buf);
free(pop);
}
if (switch_buffer_inuse(pvt->audio_buffer) && (bytes = switch_buffer_read(pvt->audio_buffer, frame->data, frame->datalen))) {
} else if (switch_buffer_inuse(pvt->audio_buffer) && (bytes = switch_buffer_read(pvt->audio_buffer, frame->data, frame->datalen))) {
if (bytes < frame->datalen) {
switch_byte_t *dp = frame->data;
memset(dp + bytes, 0, frame->datalen - bytes);