diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-28 16:35:31 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-28 16:35:31 +0000 |
commit | 18c0c3f67048f12d6a90ff0d2e734f418993af3f (patch) | |
tree | 848ad080db1a3fb7db09cb3d15c1a4e682b2d654 /rtp.c | |
parent | 06d84a8a1f67a4b6d449e1708c4719804a11dbd8 (diff) |
Permit RTP to be reset
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4568 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-x | rtp.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -976,6 +976,24 @@ void ast_rtp_stop(struct ast_rtp *rtp) } } +void ast_rtp_reset(struct ast_rtp *rtp) +{ + memset(&rtp->rxcore, 0, sizeof(rtp->rxcore)); + memset(&rtp->txcore, 0, sizeof(rtp->txcore)); + memset(&rtp->dtmfmute, 0, sizeof(rtp->dtmfmute)); + rtp->lastts = 0; + rtp->lastrxts = 0; + rtp->lastividtimestamp = 0; + rtp->lastovidtimestamp = 0; + rtp->lasteventseqn = 0; + rtp->lasttxformat = 0; + rtp->lastrxformat = 0; + rtp->dtmfcount = 0; + rtp->dtmfduration = 0; + rtp->seqno = 0; + rtp->rxseqno = 0; +} + void ast_rtp_destroy(struct ast_rtp *rtp) { if (rtp->smoother) |