diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-17 22:09:52 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-17 22:09:52 +0000 |
commit | c5bf08ff69e47eff0dc8dd2067a983b4c17ebb21 (patch) | |
tree | 0d7186a12e901f41eb3e55245e268f3f4ebe552a /channels | |
parent | b9b89af9a8d97956f895947b8db21710d478ad25 (diff) |
Instead of dividing the offset by 2 directly, make it more clear that the
offset is being scaled by the size of the elements in the buffer.
(Inspired by a discussing on the asterisk-dev list about this code)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51204 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_zap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 0208f54f0..c2fad91d7 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -4774,7 +4774,7 @@ static struct ast_frame *zt_read(struct ast_channel *ast) p->subs[index].f.samples = READ_SIZE; p->subs[index].f.mallocd = 0; p->subs[index].f.offset = AST_FRIENDLY_OFFSET; - p->subs[index].f.data = p->subs[index].buffer + AST_FRIENDLY_OFFSET/2; + p->subs[index].f.data = p->subs[index].buffer + AST_FRIENDLY_OFFSET / sizeof(p->subs[index].buffer[0]); #if 0 ast_log(LOG_DEBUG, "Read %d of voice on %s\n", p->subs[index].f.datalen, ast->name); #endif |