mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Merged revisions 46554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46554 | russell | 2006-10-31 00:55:07 -0500 (Tue, 31 Oct 2006) | 5 lines Add a small tweak to the code that checks to see whether destination formats are translatable based on the source format. If we have already determined that there is no translation path in one direction, don't bother checking the other direction. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -781,13 +781,14 @@ unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src
|
|||||||
|
|
||||||
/* if we don't have a translation path from the src
|
/* if we don't have a translation path from the src
|
||||||
to this format, remove it from the result */
|
to this format, remove it from the result */
|
||||||
if (!tr_matrix[src_audio][powerof(x)].step)
|
if (!tr_matrix[src_audio][powerof(x)].step) {
|
||||||
res &= ~x;
|
res &= ~x;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* now check the opposite direction */
|
/* now check the opposite direction */
|
||||||
if (!tr_matrix[powerof(x)][src_audio].step)
|
if (!tr_matrix[powerof(x)][src_audio].step)
|
||||||
res &= ~x;
|
res &= ~x;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For a given source video format, traverse the list of
|
/* For a given source video format, traverse the list of
|
||||||
@@ -806,8 +807,10 @@ unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src
|
|||||||
|
|
||||||
/* if we don't have a translation path from the src
|
/* if we don't have a translation path from the src
|
||||||
to this format, remove it from the result */
|
to this format, remove it from the result */
|
||||||
if (!tr_matrix[src_video][powerof(x)].step)
|
if (!tr_matrix[src_video][powerof(x)].step) {
|
||||||
res &= ~x;
|
res &= ~x;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* now check the opposite direction */
|
/* now check the opposite direction */
|
||||||
if (!tr_matrix[powerof(x)][src_video].step)
|
if (!tr_matrix[powerof(x)][src_video].step)
|
||||||
|
Reference in New Issue
Block a user