aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 14:54:42 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 14:54:42 +0000
commit0559737a4b46072135f53d178796cc326aee3441 (patch)
tree8c363781015b35454b3616619dcce1889e561d23 /main
parentb741bc6c3692b4269efce961bbf3b378850e9990 (diff)
Put my slinfactory changes back in.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@113009 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/slinfactory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/slinfactory.c b/main/slinfactory.c
index 6c1bdd6f9..af70399e6 100644
--- a/main/slinfactory.c
+++ b/main/slinfactory.c
@@ -172,6 +172,9 @@ int ast_slinfactory_read(struct ast_slinfactory *sf, short *buf, size_t samples)
memcpy(offset, frame_data, ineed * sizeof(*offset));
sofar += ineed;
frame_data += ineed;
+ if (remain > (AST_SLINFACTORY_MAX_HOLD - sf->holdlen)) {
+ remain = AST_SLINFACTORY_MAX_HOLD - sf->holdlen;
+ }
memcpy(sf->hold, frame_data, remain * sizeof(*offset));
sf->holdlen = remain;
}