]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't forget to byte swap if we are exiting the smoother feed early. (issue #8287...
authorJoshua Colp <jcolp@digium.com>
Mon, 20 Nov 2006 19:50:21 +0000 (19:50 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 20 Nov 2006 19:50:21 +0000 (19:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47859 65c4cc65-6c06-0410-ace0-fbb531ad65f3

frame.c

diff --git a/frame.c b/frame.c
index 27d82d665d229c9c7ff6dca136f12cf5f5128d65..ddb61d6fbb8563f23c422a0ba8fc8adac205f73d 100644 (file)
--- 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;