aboutsummaryrefslogtreecommitdiffstats
path: root/frame.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-20 17:52:31 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-20 17:52:31 +0000
commit37635ecfddf4b8588ad75a0711297d758b588a99 (patch)
tree7245c62b654dba30ee2e30e15f9e0849dd1839ee /frame.c
parent74937e92ec1b92f4d70f742632f779738b5f6a6a (diff)
Major RTP fixes for using inbound SDP on outbound connection, get rid of
old local rtp stuff... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7551 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'frame.c')
-rw-r--r--frame.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/frame.c b/frame.c
index 41030aaca..e5b4840c1 100644
--- a/frame.c
+++ b/frame.c
@@ -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;
+}