[asterisk-commits] branch group/rtpjitterbuffer r30836 - in
/team/group/rtpjitterbuffer: ./ chan...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue May 30 10:33:43 MST 2006
Author: russell
Date: Tue May 30 12:33:42 2006
New Revision: 30836
URL: http://svn.digium.com/view/asterisk?rev=30836&view=rev
Log:
- fix the case where chan_zap wouldn't read the jitterbuffer options if they
were listed at the bottom of zapata.conf
- if jb-force is enabled, but the channel on the other side does not create
jitter, do not put a jitter buffer on the channel.
(fixes from Slav)
Modified:
team/group/rtpjitterbuffer/abstract_jb.c
team/group/rtpjitterbuffer/channels/chan_zap.c
Modified: team/group/rtpjitterbuffer/abstract_jb.c
URL: http://svn.digium.com/view/asterisk/team/group/rtpjitterbuffer/abstract_jb.c?rev=30836&r1=30835&r2=30836&view=diff
==============================================================================
--- team/group/rtpjitterbuffer/abstract_jb.c (original)
+++ team/group/rtpjitterbuffer/abstract_jb.c Tue May 30 12:33:42 2006
@@ -226,7 +226,7 @@
int c1_jb_created = ast_test_flag(jb1, JB_CREATED);
/* Determine whether audio going to c0 needs a jitter buffer */
- if (((!c0_wants_jitter && c1_creates_jitter) || c0_force_jb) && c0_jb_enabled) {
+ if (((!c0_wants_jitter && c1_creates_jitter) || (c0_force_jb && c1_creates_jitter)) && c0_jb_enabled) {
ast_set_flag(jb0, JB_USE);
if (!c0_jb_timebase_initialized) {
if (c1_jb_timebase_initialized) {
@@ -243,7 +243,7 @@
}
/* Determine whether audio going to c1 needs a jitter buffer */
- if (((!c1_wants_jitter && c0_creates_jitter) || c1_force_jb) && c1_jb_enabled) {
+ if (((!c1_wants_jitter && c0_creates_jitter) || (c1_force_jb && c0_creates_jitter)) && c1_jb_enabled) {
ast_set_flag(jb1, JB_USE);
if (!c1_jb_timebase_initialized) {
if (c0_jb_timebase_initialized) {
Modified: team/group/rtpjitterbuffer/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/rtpjitterbuffer/channels/chan_zap.c?rev=30836&r1=30835&r2=30836&view=diff
==============================================================================
--- team/group/rtpjitterbuffer/channels/chan_zap.c (original)
+++ team/group/rtpjitterbuffer/channels/chan_zap.c Tue May 30 12:33:42 2006
@@ -10225,6 +10225,9 @@
{
struct ast_config *cfg;
struct ast_variable *v;
+#ifdef AST_JB
+ struct ast_variable *vjb;
+#endif /* AST_JB */
struct zt_pvt *tmp;
char *chan;
char *c;
@@ -10313,19 +10316,15 @@
}
}
#endif
+ v = ast_variable_browse(cfg, "channels");
#ifdef AST_JB
/* Copy the default jb config over global_jbconf */
memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
+ /* Traverse all variables to handle jb conf */
+ for (vjb = v; vjb; vjb = vjb->next)
+ ast_jb_read_conf(&global_jbconf, vjb->name, vjb->value);
#endif /* AST_JB */
- v = ast_variable_browse(cfg, "channels");
while(v) {
-#ifdef AST_JB
- /* handle jb conf */
- if (!ast_jb_read_conf(&global_jbconf, v->name, v->value)) {
- v = v->next;
- continue;
- }
-#endif /* AST_JB */
/* Create the interface list */
if (!strcasecmp(v->name, "channel")
#ifdef HAVE_LIBPRI
More information about the asterisk-commits
mailing list