diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-07-14 12:28:18 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-07-20 20:40:26 +0200 |
commit | 2e6afa799ef693b94f993f54ed41a84f6d9f1685 (patch) | |
tree | 4bbaa6d60ca130e97a6a4a36bc86b6ac0319ba1e /fftools/ffplay.c | |
parent | b23abb7c484b0ada607a73a62ce6c6efe33fc47c (diff) |
fftools/cmdutils: add error handling to GROW_ARRAY()
Diffstat (limited to 'fftools/ffplay.c')
-rw-r--r-- | fftools/ffplay.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 99700dc6f2..1f9757d607 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -388,7 +388,10 @@ static const struct TextureFormatEntry { static int opt_add_vfilter(void *optctx, const char *opt, const char *arg) { - GROW_ARRAY(vfilters_list, nb_vfilters); + int ret = GROW_ARRAY(vfilters_list, nb_vfilters); + if (ret < 0) + return ret; + vfilters_list[nb_vfilters - 1] = arg; return 0; } |