From: Joshua Colp Date: Thu, 18 Dec 2008 17:11:42 +0000 (+0000) Subject: Only care about a compatible codec for early bridging if we are actually bridging... X-Git-Tag: 1.4.23-testing~2^2~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a354c35006cc35247567733198648f0dc73f64c;p=thirdparty%2Fasterisk.git Only care about a compatible codec for early bridging if we are actually bridging to another channel. If we are not we actually want to bring the audio back to us. (closes issue #13545) Reported by: davidw git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165591 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/rtp.c b/main/rtp.c index 01083410d3..28fcad75fa 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -1540,10 +1540,9 @@ int ast_rtp_early_bridge(struct ast_channel *dest, struct ast_channel *src) else destcodec = 0; /* Ensure we have at least one matching codec */ - if (!(srccodec & destcodec)) { + if (srcp && !(srccodec & destcodec)) { ast_channel_unlock(dest); - if (src) - ast_channel_unlock(src); + ast_channel_unlock(src); return 0; } /* Consider empty media as non-existant */