mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
If nativeformats changes, recalculate formats (bug #2224)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2506,6 +2506,8 @@ int ast_channel_bridge(struct ast_channel *c0, struct ast_channel *c1, struct as
|
||||
int res=0;
|
||||
int nativefailed=0;
|
||||
int firstpass;
|
||||
int o0nativeformats;
|
||||
int o1nativeformats;
|
||||
struct timeval start_time,precise_now;
|
||||
long elapsed_ms=0, time_left_ms=0;
|
||||
int playit=0, playitagain=1, first_time=1;
|
||||
@@ -2550,7 +2552,8 @@ int ast_channel_bridge(struct ast_channel *c0, struct ast_channel *c1, struct as
|
||||
"Uniqueid1: %s\r\n"
|
||||
"Uniqueid2: %s\r\n",
|
||||
c0->name, c1->name, c0->uniqueid, c1->uniqueid);
|
||||
|
||||
o1nativeformats = c1->nativeformats;
|
||||
o0nativeformats = c0->nativeformats;
|
||||
for (/* ever */;;) {
|
||||
/* timestamp */
|
||||
if (config->timelimit) {
|
||||
@@ -2624,7 +2627,7 @@ int ast_channel_bridge(struct ast_channel *c0, struct ast_channel *c1, struct as
|
||||
if (res != -3) nativefailed++;
|
||||
}
|
||||
|
||||
if (((c0->writeformat != c1->readformat) || (c0->readformat != c1->writeformat)) &&
|
||||
if (((c0->writeformat != c1->readformat) || (c0->readformat != c1->writeformat) || (c0->nativeformats != o0nativeformats) || (c1->nativeformats != o1nativeformats)) &&
|
||||
!(c0->generator || c1->generator)) {
|
||||
if (ast_channel_make_compatible(c0, c1)) {
|
||||
ast_log(LOG_WARNING, "Can't make %s and %s compatible\n", c0->name, c1->name);
|
||||
@@ -2636,6 +2639,8 @@ int ast_channel_bridge(struct ast_channel *c0, struct ast_channel *c1, struct as
|
||||
c0->name, c1->name, c0->uniqueid, c1->uniqueid);
|
||||
return -1;
|
||||
}
|
||||
o0nativeformats = c0->nativeformats;
|
||||
o1nativeformats = c1->nativeformats;
|
||||
}
|
||||
who = ast_waitfor_n(cs, 2, &to);
|
||||
if (!who) {
|
||||
|
Reference in New Issue
Block a user