avutil/dict: av_realloc -> av_realloc_array()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2020-05-25 23:21:27 +08:00
parent a1223ddc56
commit 4bc5eb27a7
1 changed files with 2 additions and 2 deletions

View File

@ -103,8 +103,8 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
av_free(tag->key);
*tag = m->elems[--m->count];
} else if (copy_value) {
AVDictionaryEntry *tmp = av_realloc(m->elems,
(m->count + 1) * sizeof(*m->elems));
AVDictionaryEntry *tmp = av_realloc_array(m->elems,
m->count + 1, sizeof(*m->elems));
if (!tmp)
goto err_out;
m->elems = tmp;