mirror of
https://github.com/Motion-Project/motion.git
synced 2026-05-18 11:34:52 -04:00
Revise parsing for secondary parameters
This commit is contained in:
19
src/util.cpp
19
src/util.cpp
@@ -820,7 +820,7 @@ int mycopy_packet(AVPacket *dest_pkt, AVPacket *src_pkt){
|
||||
}
|
||||
/*********************************************/
|
||||
|
||||
static void util_parms_free(struct ctx_params *params)
|
||||
void util_parms_free(struct ctx_params *params)
|
||||
{
|
||||
int indx_parm;
|
||||
|
||||
@@ -1118,3 +1118,20 @@ int util_parms_parse(struct ctx_params *params, std::string confline)
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
void util_parms_add_default(ctx_params *params, std::string parm_nm, std::string parm_vl)
|
||||
{
|
||||
|
||||
int indx, dflt;
|
||||
|
||||
dflt = TRUE;
|
||||
for (indx = 0; indx < params->params_count; indx++) {
|
||||
if ( mystreq(params->params_array[indx].param_name, parm_nm.c_str()) ) {
|
||||
dflt = FALSE;
|
||||
}
|
||||
}
|
||||
if (dflt == TRUE) {
|
||||
util_parms_add(params, parm_nm.c_str(), parm_vl.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user