summaryrefslogtreecommitdiffstats
path: root/chan_lcr.c
diff options
context:
space:
mode:
authorschlaile2008-07-22 20:46:16 +0200
committerroot2008-07-22 20:46:16 +0200
commit45fdd28ad2eb0eb0457ad440b7023243ba9db815 (patch)
treed4ac7cca5f1a2d2c0a51cd16133b70abe06d13cc /chan_lcr.c
parentrebuffer option for chan_lcr (160 bytes per frame) (diff)
downloadlcr-45fdd28ad2eb0eb0457ad440b7023243ba9db815.tar.gz
lcr-45fdd28ad2eb0eb0457ad440b7023243ba9db815.tar.xz
lcr-45fdd28ad2eb0eb0457ad440b7023243ba9db815.zip
made lcr_read read frames in 160 bytes packets in rebuffer mode
Diffstat (limited to 'chan_lcr.c')
-rw-r--r--chan_lcr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/chan_lcr.c b/chan_lcr.c
index dc7ebed..2790cf4 100644
--- a/chan_lcr.c
+++ b/chan_lcr.c
@@ -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;