summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-11-18 16:08:55 -0800
committerJohn Stebbins <[email protected]>2019-11-18 16:22:35 -0800
commit51da3e2d134f0937162e627e658146bc3fbda1e4 (patch)
treeac9cbd34c42235e7f447d44e00edb0e1bd1f88bf
parent3ac6e3c70fe677ef00a737f75f5d331b43633123 (diff)
encx265: use locale agnostic level name
Attempting to specify a level resulted in an error for locales that don't use '.' as decimal separator (cherry picked from commit 90536198931b5d67f8b61ca7cf203f7487177341)
-rw-r--r--libhb/encx265.c6
-rw-r--r--libhb/handbrake/h265_common.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/libhb/encx265.c b/libhb/encx265.c
index 025f80120..c25913429 100644
--- a/libhb/encx265.c
+++ b/libhb/encx265.c
@@ -93,9 +93,11 @@ int apply_h265_level(hb_work_private_t *pv, x265_param *param,
int i;
for (i = 1; hb_h265_level_values[i]; i++)
{
- if (!strcmp(hb_h265_level_names[i], h265_level))
+ if (!strcmp(hb_h265_level_names[i], h265_level) ||
+ !strcmp(hb_h265_level_names2[i], h265_level))
{
- return param_parse(pv, param, "level-idc", h265_level);
+ return param_parse(pv, param, "level-idc",
+ hb_h265_level_names2[i]);
}
}
diff --git a/libhb/handbrake/h265_common.h b/libhb/handbrake/h265_common.h
index 98fac0ddc..5be17bdc1 100644
--- a/libhb/handbrake/h265_common.h
+++ b/libhb/handbrake/h265_common.h
@@ -33,6 +33,9 @@ static const char * const hb_h265_profile_names_16bit[] = {
static const char * const hb_h265_level_names[] = {
"auto", "1.0", "2.0", "2.1", "3.0", "3.1", "4.0", "4.1",
"5.0", "5.1", "5.2", "6.0", "6.1", "6.2", NULL, };
+static const char * const hb_h265_level_names2[] = {
+ "auto", "10", "20", "21", "30", "31", "40", "41",
+ "50", "51", "52", "60", "61", "62", NULL, };
static const int hb_h265_level_values[] = {
-1, 30, 60, 63, 90, 93, 120, 123,
150, 153, 156, 180, 183, 186, 0, };