MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_validate_param_string

Function hb_validate_param_string

libhb/param.c:1002–1021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1000}
1001
1002int hb_validate_param_string(const char *regex_pattern, const char *param_string)
1003{
1004 regex_t regex_temp;
1005
1006 if (regcomp(&regex_temp, regex_pattern, REG_EXTENDED|REG_ICASE) == 0)
1007 {
1008 if (regexec(&regex_temp, param_string, 0, NULL, 0) == 0)
1009 {
1010 regfree(&regex_temp);
1011 return 0;
1012 }
1013 }
1014 else
1015 {
1016 hb_log("hb_validate_param_string: Error compiling regex for pattern (%s).\n", param_string);
1017 }
1018
1019 regfree(&regex_temp);
1020 return 1;
1021}
1022
1023int hb_validate_filter_settings(int filter_id, const hb_dict_t * settings)
1024{

Callers 2

parse_datestringFunction · 0.85

Calls 1

hb_logFunction · 0.85

Tested by

no test coverage detected