mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
Permit RTP to be reset
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
18
rtp.c
18
rtp.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user