Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
4ebf0b10
Commit
4ebf0b10
authored
Mar 12, 2016
by
Thilo Borgmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu/dict: Add new flag to allow multiple equal keys.
parent
277408b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
dict.c
libavutil/dict.c
+4
-1
dict.h
libavutil/dict.h
+3
-2
No files found.
libavutil/dict.c
View file @
4ebf0b10
...
...
@@ -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
...
...
libavutil/dict.h
View file @
4ebf0b10
...
...
@@ -76,6 +76,7 @@
#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries.
#define AV_DICT_APPEND 32
/**< If the entry already exists, append to it. Note that no
delimiter is added, the strings are simply concatenated. */
#define AV_DICT_MULTIKEY 64
/**< Allow to store several equal keys in the dictionary */
typedef
struct
AVDictionaryEntry
{
char
*
key
;
...
...
@@ -121,8 +122,8 @@ int av_dict_count(const AVDictionary *m);
*
* @param pm pointer to a pointer to a dictionary struct. If *pm is NULL
* a dictionary struct is allocated and put in *pm.
* @param key entry key to add to *pm (will
be av_strduped
depending on flags)
* @param value entry value to add to *pm (will be av_strduped depending on flags).
* @param key entry key to add to *pm (will
either be av_strduped or added as a new key
depending on flags)
* @param value entry value to add to *pm (will be av_strduped
or added as a new key
depending on flags).
* Passing a NULL value will cause an existing entry to be deleted.
* @return >= 0 on success otherwise an error code <0
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment