summaryrefslogtreecommitdiffstats
path: root/test/test.c
diff options
context:
space:
mode:
authorbradleys <[email protected]>2014-10-15 23:48:23 +0000
committerbradleys <[email protected]>2014-10-15 23:48:23 +0000
commit2264a184f8e82dfe2996e57283ae3d38de24a452 (patch)
treee101ed07265063a4dfcf846131044dbce8032186 /test/test.c
parent6a7aae29226cece735f305da594a189f16ea374e (diff)
libhb: Add filter parameter validation.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6447 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/test/test.c b/test/test.c
index a7299736c..bfc9294ff 100644
--- a/test/test.c
+++ b/test/test.c
@@ -4356,11 +4356,6 @@ static int ParseOptions( int argc, char ** argv )
if (nlmeans)
{
- if (nlmeans_opt == NULL && nlmeans_tune_opt != NULL)
- {
- fprintf(stdout, "Default nlmeans parameters specified; ignoring nlmeans tune (%s).\n", nlmeans_tune_opt);
- }
-
char *opt = hb_generate_filter_settings(HB_FILTER_NLMEANS,
nlmeans_opt, nlmeans_tune_opt);
if (opt != NULL)
@@ -4368,6 +4363,15 @@ static int ParseOptions( int argc, char ** argv )
free(nlmeans_opt);
nlmeans_opt = opt;
}
+ else if (nlmeans_opt != NULL)
+ {
+ fprintf(stderr, "Invalid parameters for nlmeans (%s).", nlmeans_opt);
+ return -1;
+ }
+ else if (nlmeans_tune_opt != NULL)
+ {
+ fprintf(stdout, "Default nlmeans parameters specified; ignoring nlmeans tune (%s).\n", nlmeans_tune_opt);
+ }
}
if (denoise)
{
@@ -4378,6 +4382,11 @@ static int ParseOptions( int argc, char ** argv )
free(denoise_opt);
denoise_opt = opt;
}
+ else if (denoise_opt != NULL)
+ {
+ fprintf(stderr, "Invalid parameters for hqdn3d (%s).", denoise_opt);
+ return -1;
+ }
}
return 0;