summaryrefslogtreecommitdiffstats
path: root/libhb/lang.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-05-06 16:04:08 +0000
committerjstebbins <[email protected]>2015-05-06 16:04:08 +0000
commit9c0e97cc2c369e0c720441d182bbde20210742f4 (patch)
tree8b8f74ed24d0f617c9980d9043ebd53c33c531f3 /libhb/lang.c
parent81bcee10d2ad88f44c0f7791f2dd8da4ee2c1b76 (diff)
libhb,cli: add preset management to libhb, use it in cli
This results in custom preset support in the CLI and additional command line options to fully support all preset keys. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7158 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/lang.c')
-rw-r--r--libhb/lang.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libhb/lang.c b/libhb/lang.c
index f40520a23..34466da34 100644
--- a/libhb/lang.c
+++ b/libhb/lang.c
@@ -202,10 +202,16 @@ static const iso639_lang_t languages[] =
static const int lang_count = sizeof(languages) / sizeof(languages[0]);
-iso639_lang_t * lang_lookup( const char * str )
+const iso639_lang_t * lang_lookup( const char * str )
{
iso639_lang_t * lang;
+ // We use "Any" as a synonym for undefined
+ if (!strcasecmp("any", str))
+ {
+ return &languages[0];
+ }
+
for (lang = (iso639_lang_t*) languages; lang->eng_name; lang++)
{
if ((lang->iso639_1 != NULL && !strcasecmp(lang->iso639_1, str)) ||