aboutsummaryrefslogtreecommitdiffstats
path: root/frame.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-12 22:58:49 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-12 22:58:49 +0000
commit41df2e668668137091861464cabe91cf110f4302 (patch)
tree921cb941ba1a59df6cc1650b935d249fa0b73f84 /frame.c
parent476ed07a1111e6172eb4f860ad239d3ef7bb5f49 (diff)
manual update, since automerge is not running at this time
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@48421 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'frame.c')
-rw-r--r--frame.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/frame.c b/frame.c
index 27d82d665..ddb61d6fb 100644
--- a/frame.c
+++ b/frame.c
@@ -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;