Unified · Split
| @@ -665,10 +665,10 @@ static int init_parse_context(OptionParseContext *octx, · 664 unmodified lines | |||
| 665 | 665 | ||
| 666 | memset(octx, 0, sizeof(*octx)); | 666 | memset(octx, 0, sizeof(*octx)); |
| 667 | 667 | ||
| 668 | octx->nb_groups = nb_groups; | 668 | octx->groups = av_calloc(nb_groups, sizeof(*octx->groups)); |
| 669 | octx->groups = av_calloc(octx->nb_groups, sizeof(*octx->groups)); | ||
| 670 | if (!octx->groups) | 669 | if (!octx->groups) |
| 671 | return AVERROR(ENOMEM); | 670 | return AVERROR(ENOMEM); |
| 671 | octx->nb_groups = nb_groups; | ||
| 672 | 672 | ||
| 673 | for (i = 0; i < octx->nb_groups; i++) | 673 | for (i = 0; i < octx->nb_groups; i++) |
| 674 | octx->groups[i].group_def = &groups[i]; | 674 | octx->groups[i].group_def = &groups[i]; |