mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
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
This commit is contained in:
25
frame.c
25
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user