Put my slinfactory changes back in.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2008-04-07 14:54:42 +00:00
parent eb930d5edd
commit c7d51a7fc1
2 changed files with 6 additions and 1 deletions

View File

@@ -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;
}