summaryrefslogtreecommitdiff
path: root/libavutil/dict.c
diff options
context:
space:
mode:
authorThilo Borgmann <thilo.borgmann@mail.de>2016-03-12 14:52:17 +0100
committerThilo Borgmann <thilo.borgmann@mail.de>2016-03-25 17:08:11 +0100
commit4ebf0b109cdb4daa888d69e8294621948168c46c (patch)
treedfeb966900d2b5978f8d35f1d5f3cb2113a8bf41 /libavutil/dict.c
parent277408b7f16eeea60f1f7850638373307f967616 (diff)
downloadffmpeg-4ebf0b109cdb4daa888d69e8294621948168c46c.tar.gz
lavu/dict: Add new flag to allow multiple equal keys.
Diffstat (limited to 'libavutil/dict.c')
-rw-r--r--libavutil/dict.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/dict.c b/libavutil/dict.c
index 12035627f9..3b509a41c7 100644
--- a/libavutil/dict.c
+++ b/libavutil/dict.c
@@ -70,9 +70,12 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
int flags)
{
AVDictionary *m = *pm;
- AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags);
+ AVDictionaryEntry *tag = NULL;
char *oldval = NULL, *copy_key = NULL, *copy_value = NULL;
+ if (!(flags & AV_DICT_MULTIKEY)) {
+ tag = av_dict_get(m, key, NULL, flags);
+ }
if (flags & AV_DICT_DONT_STRDUP_KEY)
copy_key = (void *)key;
else