Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Fietze <roman.fietze@telemotive.de>2014-04-03 14:43:41 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-04-03 15:13:25 +0400
commite12a73246d8ce7d0fc4036522688934e26de4bb1 (patch)
treef15fd4ff3f1a981a334da2e7270e5d47d289f64d /libavutil/dict.c
parentfd2bcfc4d6967588168443849b9bc365c78bb9af (diff)
dict: const pointers to dictionary where possible
This avoids temporaries or ugly casting in the calling code where const dictionaries are used. Esp. helpful when writing C++ wrappers for an AVDictionary having const member functions and CTORs with const references. Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/dict.c')
-rw-r--r--libavutil/dict.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/dict.c b/libavutil/dict.c
index 0bf54b5b93..003afd74fc 100644
--- a/libavutil/dict.c
+++ b/libavutil/dict.c
@@ -35,7 +35,7 @@ int av_dict_count(const AVDictionary *m)
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)
{
unsigned int i, j;
@@ -181,7 +181,7 @@ void av_dict_free(AVDictionary **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;