aboutsummaryrefslogtreecommitdiffstats
path: root/main/frame.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-20 19:52:38 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-20 19:52:38 +0000
commit334a20e19484edc19bbeea0dab7eb8906fbd0141 (patch)
tree4a5adec8521f9968df66b72b5ceb9b72deeaee5c /main/frame.c
parentdc11f92dcb81e0a0af345f4d686f63e12e419e26 (diff)
Merged revisions 47860 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r47860 | file | 2006-11-20 14:51:36 -0500 (Mon, 20 Nov 2006) | 10 lines Merged revisions 47859 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r47859 | file | 2006-11-20 14:50:21 -0500 (Mon, 20 Nov 2006) | 2 lines 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/trunk@47861 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/frame.c')
-rw-r--r--main/frame.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/frame.c b/main/frame.c
index 73f2e3d15..681f36892 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -188,6 +188,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 {
@@ -198,6 +200,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;