summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavutil/dict.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavutil/dict.h')
-rw-r--r--chromium/third_party/ffmpeg/libavutil/dict.h43
1 files changed, 24 insertions, 19 deletions
diff --git a/chromium/third_party/ffmpeg/libavutil/dict.h b/chromium/third_party/ffmpeg/libavutil/dict.h
index 1dfc5a6443a..cf77cf9a323 100644
--- a/chromium/third_party/ffmpeg/libavutil/dict.h
+++ b/chromium/third_party/ffmpeg/libavutil/dict.h
@@ -31,6 +31,8 @@
#ifndef AVUTIL_DICT_H
#define AVUTIL_DICT_H
+#include "version.h"
+
/**
* @addtogroup lavu_dict AVDictionary
* @ingroup lavu_data
@@ -46,21 +48,21 @@
* entries and finally av_dict_free() to free the dictionary
* and all its contents.
*
- * @code
- * AVDictionary *d = NULL; // "create" an empty dictionary
- * av_dict_set(&d, "foo", "bar", 0); // add an entry
- *
- * char *k = av_strdup("key"); // if your strings are already allocated,
- * char *v = av_strdup("value"); // you can avoid copying them like this
- * av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
- *
- * AVDictionaryEntry *t = NULL;
- * while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) {
- * <....> // iterate over all entries in d
- * }
- *
- * av_dict_free(&d);
- * @endcode
+ @code
+ AVDictionary *d = NULL; // "create" an empty dictionary
+ AVDictionaryEntry *t = NULL;
+
+ av_dict_set(&d, "foo", "bar", 0); // add an entry
+
+ char *k = av_strdup("key"); // if your strings are already allocated,
+ char *v = av_strdup("value"); // you can avoid copying them like this
+ av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
+
+ while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) {
+ <....> // iterate over all entries in d
+ }
+ av_dict_free(&d);
+ @endcode
*
*/
@@ -85,17 +87,20 @@ typedef struct AVDictionary AVDictionary;
/**
* Get a dictionary entry with matching key.
*
+ * The returned entry key or value must not be changed, or it will
+ * cause undefined behavior.
+ *
* To iterate through all the dictionary entries, you can set the matching key
* to the null string "" and set the AV_DICT_IGNORE_SUFFIX flag.
*
* @param prev Set to the previous matching element to find the next.
* If set to NULL the first matching element is returned.
* @param key matching key
- * @param flags Allows case as well as suffix-insensitive comparisons.
- * @return Found entry or NULL, changing key or value leads to undefined behavior.
+ * @param flags a collection of AV_DICT_* flags controlling how the entry is retrieved
+ * @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(FF_CONST_AVUTIL53 AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
/**
* Get number of entries in dictionary.
@@ -145,7 +150,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, FF_CONST_AVUTIL53 AVDictionary *src, int flags);
/**
* Free all the memory allocated for an AVDictionary struct