| 703 | } |
| 704 | |
| 705 | static void init_parse_context(OptionParseContext *octx, |
| 706 | const OptionGroupDef *groups, int nb_groups) |
| 707 | { |
| 708 | static const OptionGroupDef global_group = { "global" }; |
| 709 | int i; |
| 710 | |
| 711 | memset(octx, 0, sizeof(*octx)); |
| 712 | |
| 713 | octx->nb_groups = nb_groups; |
| 714 | octx->groups = av_mallocz_array(octx->nb_groups, sizeof(*octx->groups)); |
| 715 | if (!octx->groups) |
| 716 | exit_program(1); |
| 717 | |
| 718 | for (i = 0; i < octx->nb_groups; i++) |
| 719 | octx->groups[i].group_def = &groups[i]; |
| 720 | |
| 721 | octx->global_opts.group_def = &global_group; |
| 722 | octx->global_opts.arg = ""; |
| 723 | |
| 724 | init_opts(); |
| 725 | } |
| 726 | |
| 727 | void uninit_parse_context(OptionParseContext *octx) |
| 728 | { |
no test coverage detected