diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-17 16:43:55 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-17 16:43:55 +0000 |
commit | ec0cb9deda183534c9ba6d254488c98c110efdd9 (patch) | |
tree | e351551b781119f84ef18e008f2d08a61bb13a60 | |
parent | 2f4660a236080dac4740887e276208c4a12c743c (diff) |
actually return the number steps... not the number of steps minus 1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20964 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channel.c | 6 | ||||
-rw-r--r-- | translate.c | 2 |
2 files changed, 5 insertions, 3 deletions
@@ -2746,7 +2746,8 @@ int ast_channel_make_compatible(struct ast_channel *chan, struct ast_channel *pe 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 @@ int ast_channel_make_compatible(struct ast_channel *chan, struct ast_channel *pe 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); diff --git a/translate.c b/translate.c index dce4b0827..0edfa54ca 100644 --- a/translate.c +++ b/translate.c @@ -659,5 +659,5 @@ unsigned int ast_translate_path_steps(unsigned int dest, unsigned int src) if (!tr_matrix[src][dest].step) return -1; else - return tr_matrix[src][dest].multistep; + return tr_matrix[src][dest].multistep + 1; } |