Commit f0de0185 authored by Reimar Döffinger's avatar Reimar Döffinger

dict.c: minor simplification.

Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent fcb11ec2
...@@ -90,10 +90,9 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, ...@@ -90,10 +90,9 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
} else { } else {
AVDictionaryEntry *tmp = av_realloc(m->elems, AVDictionaryEntry *tmp = av_realloc(m->elems,
(m->count + 1) * sizeof(*m->elems)); (m->count + 1) * sizeof(*m->elems));
if (tmp) if (!tmp)
m->elems = tmp;
else
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
m->elems = tmp;
} }
if (value) { if (value) {
if (flags & AV_DICT_DONT_STRDUP_KEY) if (flags & AV_DICT_DONT_STRDUP_KEY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment