[asterisk-commits] file: trunk r387545 - in /trunk: channels/chan_gulp.c res/res_sip_sdp_rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 3 06:35:17 CDT 2013


Author: file
Date: Fri May  3 06:35:14 2013
New Revision: 387545

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387545
Log:
Use the configured formats for Gulp sessions if there are no joint formats between requested formats and configured formats.

(closes issue ASTERISK-21756)

Modified:
    trunk/channels/chan_gulp.c
    trunk/res/res_sip_sdp_rtp.c

Modified: trunk/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gulp.c?view=diff&rev=387545&r1=387544&r2=387545
==============================================================================
--- trunk/channels/chan_gulp.c (original)
+++ trunk/channels/chan_gulp.c Fri May  3 06:35:14 2013
@@ -434,7 +434,7 @@
 	pvt->media[SIP_MEDIA_VIDEO] = ao2_find(session->media, "video", OBJ_KEY);
 	ast_channel_tech_pvt_set(chan, pvt);
 
-	if (ast_format_cap_is_empty(session->req_caps)) {
+	if (ast_format_cap_is_empty(session->req_caps) || !ast_format_cap_has_joint(session->req_caps, session->endpoint->codecs)) {
 		ast_format_cap_copy(ast_channel_nativeformats(chan), session->endpoint->codecs);
 	} else {
 		ast_format_cap_copy(ast_channel_nativeformats(chan), session->req_caps);

Modified: trunk/res/res_sip_sdp_rtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_sip_sdp_rtp.c?view=diff&rev=387545&r1=387544&r2=387545
==============================================================================
--- trunk/res/res_sip_sdp_rtp.c (original)
+++ trunk/res/res_sip_sdp_rtp.c Fri May  3 06:35:14 2013
@@ -556,7 +556,7 @@
 
 	if (direct_media_enabled) {
 		ast_format_cap_joint_copy(session->endpoint->codecs, session->direct_media_cap, caps);
-	} else if (ast_format_cap_is_empty(session->req_caps)) {
+	} else if (ast_format_cap_is_empty(session->req_caps) || !ast_format_cap_has_joint(session->req_caps, session->endpoint->codecs)) {
 		ast_format_cap_copy(caps, session->endpoint->codecs);
 	} else {
 		ast_format_cap_joint_copy(session->endpoint->codecs, session->req_caps, caps);




More information about the asterisk-commits mailing list