MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / add_opt

Function add_opt

fftools/cmdutils.c:725–741  ·  view source on GitHub ↗

* Add an option instance to currently parsed group. */

Source from the content-addressed store, hash-verified

723 * Add an option instance to currently parsed group.
724 */
725static int add_opt(OptionParseContext *octx, const OptionDef *opt,
726 const char *key, const char *val)
727{
728 int global = !(opt->flags & OPT_PERFILE);
729 OptionGroup *g = global ? &octx->global_opts : &octx->cur_group;
730 int ret;
731
732 ret = GROW_ARRAY(g->opts, g->nb_opts);
733 if (ret < 0)
734 return ret;
735
736 g->opts[g->nb_opts - 1].opt = opt;
737 g->opts[g->nb_opts - 1].key = key;
738 g->opts[g->nb_opts - 1].val = val;
739
740 return 0;
741}
742
743static int init_parse_context(OptionParseContext *octx,
744 const OptionGroupDef *groups, int nb_groups)

Callers 1

split_commandlineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected