aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asterisk/translate.h2
-rw-r--r--main/translate.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h
index ec939e6b5..54bdc067d 100644
--- a/include/asterisk/translate.h
+++ b/include/asterisk/translate.h
@@ -23,7 +23,7 @@
#ifndef _ASTERISK_TRANSLATE_H
#define _ASTERISK_TRANSLATE_H
-//#define MAX_FORMAT 15 /* Do not include video here */
+#define MAX_AUDIO_FORMAT 15 /* Do not include video here */
#define MAX_FORMAT 32 /* Do include video here */
#if defined(__cplusplus) || defined(c_plusplus)
diff --git a/main/translate.c b/main/translate.c
index 84e255f52..e01ce9321 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -799,7 +799,7 @@ int ast_translator_best_choice(int *dst, int *srcs)
int common = ((*dst) & (*srcs)) & AST_FORMAT_AUDIO_MASK; /* are there common formats ? */
if (common) { /* yes, pick one and return */
- for (cur = 1, y = 0; y <= AST_FORMAT_MAX_AUDIO; cur <<= 1, y++) {
+ for (cur = 1, y = 0; y <= MAX_AUDIO_FORMAT; cur <<= 1, y++) {
if (cur & common) /* guaranteed to find one */
break;
}
@@ -808,10 +808,10 @@ int ast_translator_best_choice(int *dst, int *srcs)
return 0;
} else { /* No, we will need to translate */
AST_LIST_LOCK(&translators);
- for (cur = 1, y = 0; y <= AST_FORMAT_MAX_AUDIO; cur <<= 1, y++) {
+ for (cur = 1, y = 0; y <= MAX_AUDIO_FORMAT; cur <<= 1, y++) {
if (! (cur & *dst))
continue;
- for (cursrc = 1, x = 0; x <= AST_FORMAT_MAX_AUDIO; cursrc <<= 1, x++) {
+ for (cursrc = 1, x = 0; x <= MAX_AUDIO_FORMAT; cursrc <<= 1, x++) {
if (!(*srcs & cursrc) || !tr_matrix[x][y].step ||
tr_matrix[x][y].cost > besttime)
continue; /* not existing or no better */