Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
d816e125
Commit
d816e125
authored
Jun 04, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dict: const correctness for av_dict_get() and av_dict_copy()
parent
39ec5e1c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
dict.c
libavutil/dict.c
+2
-2
dict.h
libavutil/dict.h
+3
-3
No files found.
libavutil/dict.c
View file @
d816e125
...
@@ -35,7 +35,7 @@ int av_dict_count(const AVDictionary *m)
...
@@ -35,7 +35,7 @@ int av_dict_count(const AVDictionary *m)
return
m
?
m
->
count
:
0
;
return
m
?
m
->
count
:
0
;
}
}
AVDictionaryEntry
*
av_dict_get
(
AVDictionary
*
m
,
const
char
*
key
,
AVDictionaryEntry
*
av_dict_get
(
const
AVDictionary
*
m
,
const
char
*
key
,
const
AVDictionaryEntry
*
prev
,
int
flags
)
const
AVDictionaryEntry
*
prev
,
int
flags
)
{
{
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
...
@@ -178,7 +178,7 @@ void av_dict_free(AVDictionary **pm)
...
@@ -178,7 +178,7 @@ void av_dict_free(AVDictionary **pm)
av_freep
(
pm
);
av_freep
(
pm
);
}
}
void
av_dict_copy
(
AVDictionary
**
dst
,
AVDictionary
*
src
,
int
flags
)
void
av_dict_copy
(
AVDictionary
**
dst
,
const
AVDictionary
*
src
,
int
flags
)
{
{
AVDictionaryEntry
*
t
=
NULL
;
AVDictionaryEntry
*
t
=
NULL
;
...
...
libavutil/dict.h
View file @
d816e125
...
@@ -83,8 +83,8 @@ typedef struct AVDictionary AVDictionary;
...
@@ -83,8 +83,8 @@ typedef struct AVDictionary AVDictionary;
* @param flags Allows case as well as suffix-insensitive comparisons.
* @param flags Allows case as well as suffix-insensitive comparisons.
* @return Found entry or NULL, changing key or value leads to undefined behavior.
* @return Found entry or NULL, changing key or value leads to undefined behavior.
*/
*/
AVDictionaryEntry
*
AVDictionaryEntry
*
av_dict_get
(
const
AVDictionary
*
m
,
const
char
*
key
,
av_dict_get
(
AVDictionary
*
m
,
const
char
*
key
,
const
AVDictionaryEntry
*
prev
,
int
flags
);
const
AVDictionaryEntry
*
prev
,
int
flags
);
/**
/**
* Get number of entries in dictionary.
* Get number of entries in dictionary.
...
@@ -131,7 +131,7 @@ int av_dict_parse_string(AVDictionary **pm, const char *str,
...
@@ -131,7 +131,7 @@ int av_dict_parse_string(AVDictionary **pm, const char *str,
* @param flags flags to use when setting entries in *dst
* @param flags flags to use when setting entries in *dst
* @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
* @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
*/
*/
void
av_dict_copy
(
AVDictionary
**
dst
,
AVDictionary
*
src
,
int
flags
);
void
av_dict_copy
(
AVDictionary
**
dst
,
const
AVDictionary
*
src
,
int
flags
);
/**
/**
* Free all the memory allocated for an AVDictionary struct
* Free all the memory allocated for an AVDictionary struct
...
...
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