diff options
author | Mark Spencer <markster@digium.com> | 2005-12-20 17:52:31 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-12-20 17:52:31 +0000 |
commit | 0d32a85be14fe0352aaeb106843e98fc7cf1723a (patch) | |
tree | 7245c62b654dba30ee2e30e15f9e0849dd1839ee /frame.c | |
parent | 93d1d0dcfb9cd92a04b19a9cc73438665101a727 (diff) |
Major RTP fixes for using inbound SDP on outbound connection, get rid of
old local rtp stuff...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'frame.c')
-rw-r--r-- | frame.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1299,3 +1299,28 @@ int ast_frame_slinear_sum(struct ast_frame *f1, struct ast_frame *f2) return 0; } + +struct ast_frame *ast_frame_enqueue(struct ast_frame *head, struct ast_frame *f, int maxlen, int dupe) +{ + struct ast_frame *cur, *oldhead; + int len=0; + if (f && dupe) + f = ast_frdup(f); + if (!f) + return head; + + f->next = NULL; + if (!head) + return f; + cur = head; + while(cur->next) { + cur = cur->next; + len++; + if (len >= maxlen) { + oldhead = head; + head = head->next; + ast_frfree(oldhead); + } + } + return head; +} |