aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/rtp.c b/main/rtp.c
index c613aac17..904944359 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2072,10 +2072,9 @@ int ast_rtp_early_bridge(struct ast_channel *c0, struct ast_channel *c1)
else
destcodec = 0;
/* Ensure we have at least one matching codec */
- if (!(srccodec & destcodec)) {
+ if (srcp && !(srccodec & destcodec)) {
ast_channel_unlock(c0);
- if (c1)
- ast_channel_unlock(c1);
+ ast_channel_unlock(c1);
return 0;
}
/* Consider empty media as non-existent */