| 741 | } |
| 742 | |
| 743 | static int init_parse_context(OptionParseContext *octx, |
| 744 | const OptionGroupDef *groups, int nb_groups) |
| 745 | { |
| 746 | static const OptionGroupDef global_group = { "global" }; |
| 747 | int i; |
| 748 | |
| 749 | memset(octx, 0, sizeof(*octx)); |
| 750 | |
| 751 | octx->groups = av_calloc(nb_groups, sizeof(*octx->groups)); |
| 752 | if (!octx->groups) |
| 753 | return AVERROR(ENOMEM); |
| 754 | octx->nb_groups = nb_groups; |
| 755 | |
| 756 | for (i = 0; i < octx->nb_groups; i++) |
| 757 | octx->groups[i].group_def = &groups[i]; |
| 758 | |
| 759 | octx->global_opts.group_def = &global_group; |
| 760 | octx->global_opts.arg = ""; |
| 761 | |
| 762 | return 0; |
| 763 | } |
| 764 | |
| 765 | void uninit_parse_context(OptionParseContext *octx) |
| 766 | { |
no test coverage detected