[asterisk-commits] trunk r20964 - in /trunk: channel.c translate.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 17 09:43:56 MST 2006


Author: kpfleming
Date: Mon Apr 17 11:43:55 2006
New Revision: 20964

URL: http://svn.digium.com/view/asterisk?rev=20964&view=rev
Log:
actually return the number steps... not the number of steps minus 1

Modified:
    trunk/channel.c
    trunk/translate.c

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=20964&r1=20963&r2=20964&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Mon Apr 17 11:43:55 2006
@@ -2746,7 +2746,8 @@
 	   transcoding is needed; if desired, force transcode path
 	   to use SLINEAR between channels, but only if there is
 	   no direct conversion available */
-	if ((src != dst) && ast_opt_transcode_via_slin && ast_translate_path_steps(dst, src))
+	if ((src != dst) && ast_opt_transcode_via_slin &&
+	    (ast_translate_path_steps(dst, src) != 1))
 		dst = AST_FORMAT_SLINEAR;
 	if (ast_set_read_format(chan, dst) < 0) {
 		ast_log(LOG_WARNING, "Unable to set read format on channel %s to %d\n", chan->name, dst);
@@ -2769,7 +2770,8 @@
 	   transcoding is needed; if desired, force transcode path
 	   to use SLINEAR between channels, but only if there is
 	   no direct conversion available */
-	if ((src != dst) && ast_opt_transcode_via_slin && ast_translate_path_steps(dst, src))
+	if ((src != dst) && ast_opt_transcode_via_slin &&
+	    (ast_translate_path_steps(dst, src) != 1))
 		dst = AST_FORMAT_SLINEAR;
 	if (ast_set_read_format(peer, dst) < 0) {
 		ast_log(LOG_WARNING, "Unable to set read format on channel %s to %d\n", peer->name, dst);

Modified: trunk/translate.c
URL: http://svn.digium.com/view/asterisk/trunk/translate.c?rev=20964&r1=20963&r2=20964&view=diff
==============================================================================
--- trunk/translate.c (original)
+++ trunk/translate.c Mon Apr 17 11:43:55 2006
@@ -659,5 +659,5 @@
 	if (!tr_matrix[src][dest].step)
 		return -1;
 	else
-		return tr_matrix[src][dest].multistep;
-}
+		return tr_matrix[src][dest].multistep + 1;
+}



More information about the asterisk-commits mailing list