summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/lang.c6
-rw-r--r--libhb/lang.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/libhb/lang.c b/libhb/lang.c
index a8ed2e8c8..c51c80ad5 100644
--- a/libhb/lang.c
+++ b/libhb/lang.c
@@ -205,7 +205,7 @@ static const int lang_count = sizeof(languages) / sizeof(languages[0]);
const int lang_lookup_index( const char * str )
{
int ii = 0;
- iso639_lang_t * lang;
+ const iso639_lang_t * lang;
// We use "Any" as a synonym for undefined
if (!strcasecmp("any", str))
@@ -213,7 +213,7 @@ const int lang_lookup_index( const char * str )
return 0;
}
- for (ii = 0; lang->eng_name; ii++)
+ for (ii = 0; languages[ii].eng_name; ii++)
{
lang = &languages[ii];
if ((lang->iso639_1 != NULL && !strcasecmp(lang->iso639_1, str)) ||
@@ -234,7 +234,7 @@ const iso639_lang_t * lang_lookup( const char * str )
return lang_for_index(lang_lookup_index(str));
}
-iso639_lang_t * lang_for_index( int index )
+const iso639_lang_t * lang_for_index( int index )
{
if (index < 0 || index >= lang_count)
return NULL;
diff --git a/libhb/lang.h b/libhb/lang.h
index 7d794910c..a0db17162 100644
--- a/libhb/lang.h
+++ b/libhb/lang.h
@@ -30,7 +30,7 @@ const iso639_lang_t * lang_lookup( const char * str );
const int lang_lookup_index( const char * str );
/* return language for an index into the language table */
-iso639_lang_t * lang_for_index( int index );
+const iso639_lang_t * lang_for_index( int index );
/* find language associated with ISO-639-1 language code */
iso639_lang_t * lang_for_code( int code );