mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@47860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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
|
/* Optimize by sending the frame we just got
|
||||||
on the next read, thus eliminating the douple
|
on the next read, thus eliminating the douple
|
||||||
copy */
|
copy */
|
||||||
|
if (swap)
|
||||||
|
ast_swapcopy_samples(f->data, f->data, f->samples);
|
||||||
s->opt = f;
|
s->opt = f;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} 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
|
we were unable to optimize because there was still
|
||||||
some cruft left over. Lets just drop the cruft so
|
some cruft left over. Lets just drop the cruft so
|
||||||
we can move to a fully optimized path */
|
we can move to a fully optimized path */
|
||||||
|
if (swap)
|
||||||
|
ast_swapcopy_samples(f->data, f->data, f->samples);
|
||||||
s->len = 0;
|
s->len = 0;
|
||||||
s->opt = f;
|
s->opt = f;
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user