[svn-commits] oej: branch oej/videocaps r118910 - /team/oej/videocaps/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 29 06:54:22 CDT 2008


Author: oej
Date: Thu May 29 06:54:20 2008
New Revision: 118910

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118910
Log:
Trying to fix T.140 red

Modified:
    team/oej/videocaps/channels/chan_sip.c

Modified: team/oej/videocaps/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/chan_sip.c?view=diff&rev=118910&r1=118909&r2=118910
==============================================================================
--- team/oej/videocaps/channels/chan_sip.c (original)
+++ team/oej/videocaps/channels/chan_sip.c Thu May 29 06:54:20 2008
@@ -7438,7 +7438,13 @@
 				} else if (!strncasecmp(mimeSubtype, "T140", 4)) { /* Text */
 					if (p->trtp) {
 						/* ast_verbose("Adding t140 mimeSubtype to textrtp struct\n"); */
-						ast_rtp_set_rtpmap_type(newtextrtp, codec, "text", mimeSubtype, 0);
+						int res = ast_rtp_set_rtpmap_type(newtextrtp, codec, "text", mimeSubtype, 0);
+						if (res == -1) {
+							ast_debug(2, "***** FAILED setting T140 mime type!!! \n");
+						} else {
+							if (debug)
+								ast_verbose("T.140 submimetype has payload type: %d\n", red_pt);
+						}
 					} else {	/* We got T.140, but haven't got textsupport on, so remove it from declaration */
 						ast_rtp_unset_m_type(newtextrtp, codec);
 						if (debug) 
@@ -7446,22 +7452,22 @@
 					}
 				} else if (!strncasecmp(mimeSubtype, "RED", 3)) { /* Text with Redudancy */
 					if (p->trtp) {
-	
-						/* ast_verbose("Adding t140-red mimeSubtype to textrtp struct\n"); */
+						if (debug) 
+							ast_verbose("Adding t140-red mimeSubtype to textrtp struct\n");
 						int res = ast_rtp_set_rtpmap_type(newtextrtp, codec, "text", mimeSubtype, 0);
-						if (!res) {
+						if (res == -1) {
 							ast_debug(2, "***** FAILED setting T140 red mime type!!! \n");
 						} else {
 							red_pt = codec;
 							sprintf(red_fmtp, "fmtp:%d ", red_pt); 
 
 							if (debug)
-								ast_verbose("Red submimetype has payload type: %d\n", red_pt);
+								ast_verbose("T.140 Red submimetype has payload type: %d\n", red_pt);
 						}
-					} else {	/* We got RED, but haven't got textsupport on, so remove it from declaration */
+					} else {	/* We got T.140 RED, but haven't got textsupport on, so remove it from declaration */
 						ast_rtp_unset_m_type(newtextrtp, codec);
 						if (debug) 
-							ast_verbose("Found unknown media description format %s for ID %d\n", mimeSubtype, codec);
+							ast_verbose("Found not configured media description format %s for ID %d\n", mimeSubtype, codec);
 					}
 				} else {                                          /* Must be audio?? */
 					if(ast_rtp_set_rtpmap_type(newaudiortp, codec, "audio", mimeSubtype,




More information about the svn-commits mailing list