diff options
author | Terry Wilson <twilson@digium.com> | 2010-12-02 18:28:50 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2010-12-02 18:28:50 +0000 |
commit | 05b078a07dfe0baec7aa5c278b88f47885d4c52c (patch) | |
tree | 0c84e9df34fa1b2a2534170192207cf795f7bf8f /main | |
parent | 2b056c97cd5f4e13b8dd08a6c4c6fe0501aa16f2 (diff) |
Merged revisions 297312 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r297312 | twilson | 2010-12-02 12:13:49 -0600 (Thu, 02 Dec 2010) | 28 lines
Merged revisions 297311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r297311 | twilson | 2010-12-02 12:07:39 -0600 (Thu, 02 Dec 2010) | 21 lines
Merged revisions 297310 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r297310 | twilson | 2010-12-02 12:00:27 -0600 (Thu, 02 Dec 2010) | 12 lines
Initialize offset for adaptive jitter buffer
When the adaptive jitter buffer is enabled in sip.conf, the first frame placed
in the jitter buffer fails with something like:
jb_warning_output: Resyncing the jb. last_delay 0, this delay -215886466,
threshold 1000, new offset 215886466
This happens because the offset is not initialized before calling jb_put(). This
patch modifies jb_put_first_adaptive() to set the offset to the frame's
timestamp.
Review: https://reviewboard.asterisk.org/r/1041/
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/abstract_jb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/abstract_jb.c b/main/abstract_jb.c index 84b9d6199..4cd5ccb0d 100644 --- a/main/abstract_jb.c +++ b/main/abstract_jb.c @@ -762,6 +762,11 @@ static void jb_destroy_adaptive(void *jb) static int jb_put_first_adaptive(void *jb, struct ast_frame *fin, long now) { + jitterbuf *adaptivejb = (jitterbuf *) jb; + + /* Initialize the offset to that of the first frame's timestamp */ + adaptivejb->info.resync_offset = fin->ts; + return jb_put_adaptive(jb, fin, now); } |