diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-17 23:31:40 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-17 23:31:40 +0000 |
commit | e412c90ae7ccdded37e0f83109c4150215c21098 (patch) | |
tree | 3f65b3cefe4a454e48bb39771278a4e1fec4022a /channels | |
parent | 5df6bb5d8dd0da86c05596a50559e78dda35b9cc (diff) |
Merged revisions 51204 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r51204 | russell | 2007-01-17 16:09:52 -0600 (Wed, 17 Jan 2007) | 4 lines
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/trunk@51206 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 def6c1a59..8b0037727 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5056,7 +5056,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 if (option_debug) ast_log(LOG_DEBUG, "Read %d of voice on %s\n", p->subs[index].f.datalen, ast->name); |