made lcr_read read frames in 160 bytes packets in rebuffer mode

This commit is contained in:
schlaile 2008-07-22 20:46:16 +02:00 committed by root
parent a114e74299
commit 45fdd28ad2
1 changed files with 5 additions and 1 deletions

View File

@ -1943,7 +1943,11 @@ static struct ast_frame *lcr_read(struct ast_channel *ast)
return NULL;
}
if (call->pipe[0] > -1) {
len = read(call->pipe[0], call->read_buff, sizeof(call->read_buff));
if (call->rebuffer) {
len = read(call->pipe[0], call->read_buff, 160);
} else {
len = read(call->pipe[0], call->read_buff, sizeof(call->read_buff));
}
if (len <= 0) {
close(call->pipe[0]);
call->pipe[0] = -1;