summaryrefslogtreecommitdiff
path: root/libavutil/dict.h
diff options
context:
space:
mode:
authorRoman Fietze <roman.fietze@telemotive.de>2014-04-03 12:43:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-03 13:13:25 +0200
commite12a73246d8ce7d0fc4036522688934e26de4bb1 (patch)
treef15fd4ff3f1a981a334da2e7270e5d47d289f64d /libavutil/dict.h
parentfd2bcfc4d6967588168443849b9bc365c78bb9af (diff)
downloadffmpeg-e12a73246d8ce7d0fc4036522688934e26de4bb1.tar.gz
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.h')
-rw-r--r--libavutil/dict.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/dict.h b/libavutil/dict.h
index c23a2d12cb..a39a5ee0d4 100644
--- a/libavutil/dict.h
+++ b/libavutil/dict.h
@@ -98,7 +98,7 @@ typedef struct AVDictionary AVDictionary;
* @return found entry or NULL in case no matching entry was found in the dictionary
*/
AVDictionaryEntry *
-av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
+av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
/**
* Get number of entries in dictionary.
@@ -148,7 +148,7 @@ int av_dict_parse_string(AVDictionary **pm, const char *str,
* @param flags flags to use when setting entries in *dst
* @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