]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Only care about a compatible codec for early bridging if we are actually bridging...
authorJoshua Colp <jcolp@digium.com>
Thu, 18 Dec 2008 17:11:42 +0000 (17:11 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 18 Dec 2008 17:11:42 +0000 (17:11 +0000)
(closes issue #13545)
Reported by: davidw

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165591 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 01083410d3d51887612afa94f1e65d50bbacca48..28fcad75fac5313539d63f80b7cdfb78c861a8f5 100644 (file)
@@ -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 */