mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Take video into account when early bridging RTP.
(closes issue #13535) Reported by: davidw git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1524,18 +1524,18 @@ int ast_rtp_early_bridge(struct ast_channel *dest, struct ast_channel *src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
|
/* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
|
||||||
if (audio_dest_res != AST_RTP_TRY_NATIVE) {
|
if (audio_dest_res != AST_RTP_TRY_NATIVE || (video_dest_res != AST_RTP_GET_FAILED && video_dest_res != AST_RTP_TRY_NATIVE)) {
|
||||||
/* Somebody doesn't want to play... */
|
/* Somebody doesn't want to play... */
|
||||||
ast_channel_unlock(dest);
|
ast_channel_unlock(dest);
|
||||||
if (src)
|
if (src)
|
||||||
ast_channel_unlock(src);
|
ast_channel_unlock(src);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (audio_src_res == AST_RTP_TRY_NATIVE && srcpr->get_codec)
|
if (audio_src_res == AST_RTP_TRY_NATIVE && (video_src_res == AST_RTP_GET_FAILED || video_src_res == AST_RTP_TRY_NATIVE) && srcpr->get_codec)
|
||||||
srccodec = srcpr->get_codec(src);
|
srccodec = srcpr->get_codec(src);
|
||||||
else
|
else
|
||||||
srccodec = 0;
|
srccodec = 0;
|
||||||
if (audio_dest_res == AST_RTP_TRY_NATIVE && destpr->get_codec)
|
if (audio_dest_res == AST_RTP_TRY_NATIVE && (video_dest_res == AST_RTP_GET_FAILED || video_dest_res == AST_RTP_TRY_NATIVE) && destpr->get_codec)
|
||||||
destcodec = destpr->get_codec(dest);
|
destcodec = destpr->get_codec(dest);
|
||||||
else
|
else
|
||||||
destcodec = 0;
|
destcodec = 0;
|
||||||
@@ -1613,7 +1613,7 @@ int ast_rtp_make_compatible(struct ast_channel *dest, struct ast_channel *src, i
|
|||||||
destcodec = 0;
|
destcodec = 0;
|
||||||
|
|
||||||
/* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
|
/* Check if bridge is still possible (In SIP canreinvite=no stops this, like NAT) */
|
||||||
if (audio_dest_res != AST_RTP_TRY_NATIVE || audio_src_res != AST_RTP_TRY_NATIVE || !(srccodec & destcodec)) {
|
if (audio_dest_res != AST_RTP_TRY_NATIVE || (video_dest_res != AST_RTP_GET_FAILED && video_dest_res != AST_RTP_TRY_NATIVE) || audio_src_res != AST_RTP_TRY_NATIVE || (video_src_res != AST_RTP_GET_FAILED && video_src_res != AST_RTP_TRY_NATIVE) || !(srccodec & destcodec)) {
|
||||||
/* Somebody doesn't want to play... */
|
/* Somebody doesn't want to play... */
|
||||||
ast_channel_unlock(dest);
|
ast_channel_unlock(dest);
|
||||||
ast_channel_unlock(src);
|
ast_channel_unlock(src);
|
||||||
|
Reference in New Issue
Block a user