summaryrefslogtreecommitdiffstats
path: root/libhb/param.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-04-08 07:17:04 -0600
committerJohn Stebbins <[email protected]>2019-04-08 07:18:21 -0600
commit80aa72096148c8bd84e2abb677a57dcadfe03e1c (patch)
tree5f4d1000ec4f1203339373efcc8348e36f3d5756 /libhb/param.c
parent5b4771ffb4bcdf9629c64e6bd44f29a7baa34acb (diff)
Fix crash when chroma smooth tune is NULL
'HandBrakeCLI --help' was crashing ;)
Diffstat (limited to 'libhb/param.c')
-rw-r--r--libhb/param.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libhb/param.c b/libhb/param.c
index 8c6210720..b19d37db6 100644
--- a/libhb/param.c
+++ b/libhb/param.c
@@ -550,7 +550,12 @@ static hb_dict_t * generate_chroma_smooth_settings(const char *preset,
}
// Size
- if (!strcasecmp(tune, "tiny"))
+ if (tune == NULL || tune[0] == 0 ||
+ !strcasecmp(tune, "none") || !strcasecmp(tune, "medium"))
+ {
+ size = 7;
+ }
+ else if (!strcasecmp(tune, "tiny"))
{
size = 3;
}
@@ -558,11 +563,6 @@ static hb_dict_t * generate_chroma_smooth_settings(const char *preset,
{
size = 5;
}
- else if ((tune == NULL || !strcasecmp(tune, "none")) ||
- (!strcasecmp(tune, "medium")))
- {
- size = 7;
- }
else if (!strcasecmp(tune, "wide"))
{
size = 9;