diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-20 19:50:21 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-20 19:50:21 +0000 |
commit | a98a177d9e0e2333c1b549b198c4908262d530f4 (patch) | |
tree | 4b12397d9a4730a87d0b1501634867b21ac91de5 /frame.c | |
parent | 42b10fd706db91e790f760f4ac0176d7fea51881 (diff) |
Don't forget to byte swap if we are exiting the smoother feed early. (issue #8287 reported by arturs)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@47859 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'frame.c')
-rw-r--r-- | frame.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -157,6 +157,8 @@ int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap) /* Optimize by sending the frame we just got on the next read, thus eliminating the douple copy */ + if (swap) + ast_swapcopy_samples(f->data, f->data, f->samples); s->opt = f; return 0; } else { @@ -167,6 +169,8 @@ int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap) we were unable to optimize because there was still some cruft left over. Lets just drop the cruft so we can move to a fully optimized path */ + if (swap) + ast_swapcopy_samples(f->data, f->data, f->samples); s->len = 0; s->opt = f; return 0; |