Lines Matching defs:octx
617 static void finish_group(OptionParseContext *octx, int group_idx,
620 OptionGroupList *l = &octx->groups[group_idx];
626 *g = octx->cur_group;
646 memset(&octx->cur_group, 0, sizeof(octx->cur_group));
652 static void add_opt(OptionParseContext *octx, const OptionDef *opt,
656 OptionGroup *g = global ? &octx->global_opts : &octx->cur_group;
664 static void init_parse_context(OptionParseContext *octx,
670 memset(octx, 0, sizeof(*octx));
672 octx->nb_groups = nb_groups;
673 octx->groups = av_mallocz_array(octx->nb_groups, sizeof(*octx->groups));
674 if (!octx->groups)
677 for (i = 0; i < octx->nb_groups; i++)
678 octx->groups[i].group_def = &groups[i];
680 octx->global_opts.group_def = &global_group;
681 octx->global_opts.arg = "";
686 void uninit_parse_context(OptionParseContext *octx)
690 for (i = 0; i < octx->nb_groups; i++) {
691 OptionGroupList *l = &octx->groups[i];
705 av_freep(&octx->groups);
707 av_freep(&octx->cur_group.opts);
708 av_freep(&octx->global_opts.opts);
713 int split_commandline(OptionParseContext *octx, int argc, char *argv[],
723 init_parse_context(octx, groups, nb_groups);
739 finish_group(octx, 0, opt);
757 finish_group(octx, ret, arg);
775 add_opt(octx, po, opt, arg);
800 add_opt(octx, po, opt, "0");
810 if (octx->cur_group.nb_opts || codec_opts || format_opts || resample_opts)