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