39 return m ? m->
count : 0;
70 const char *
s =
entry->key;
72 for (j = 0;
s[j] ==
key[j] &&
key[j]; j++)
91 char *copy_key =
NULL, *copy_value =
NULL;
95 copy_value = (
void *)
value;
103 copy_key = (
void *)
key;
106 if (!copy_key || (
value && !copy_value))
133 size_t oldlen = strlen(
tag->value);
134 size_t new_part_len = strlen(copy_value);
135 size_t len = oldlen + new_part_len + 1;
139 memcpy(newval + oldlen, copy_value, new_part_len + 1);
146 }
else if (copy_value) {
169 if (m && !m->
count) {
187 const char *key_val_sep,
const char *pairs_sep,
194 if (
key && *
key && strspn(*buf, key_val_sep)) {
211 const char *key_val_sep,
const char *pairs_sep,
261 const char key_val_sep,
const char pairs_sep)
266 char special_chars[] = {pairs_sep, key_val_sep,
'\0'};
268 if (!
buffer || pairs_sep ==
'\0' || key_val_sep ==
'\0' || pairs_sep == key_val_sep ||
269 pairs_sep ==
'\\' || key_val_sep ==
'\\')
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static double val(void *priv, double ch)
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AV_BPRINT_SIZE_UNLIMITED
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
static int parse_key_value_pair(AVDictionary **pm, const char **buf, const char *key_val_sep, const char *pairs_sep, int flags)
void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, enum AVEscapeMode mode, int flags)
Escape the content in src and append it to dstbuf.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size)
Append data to a print buffer.
#define AV_DICT_MULTIKEY
Allow to store several equal keys in the dictionary.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key,...
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
int av_dict_get_string(const AVDictionary *m, char **buffer, const char key_val_sep, const char pairs_sep)
Get dictionary entries as a string.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
#define AV_DICT_APPEND
If the entry already exists, append to it.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AV_DICT_DONT_OVERWRITE
Don't overwrite existing entries.
int av_dict_parse_string(AVDictionary **pm, const char *str, const char *key_val_sep, const char *pairs_sep, int flags)
Parse the key/value pairs list and add the parsed entries to a dictionary.
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function.
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
#define AV_DICT_MATCH_CASE
Only get an entry with exact-case key match.
#define AV_DICT_DEDUP
If inserting a value that already exists for a key, do nothing.
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
Convenience wrapper for av_dict_set() that converts the value to a string and stores it.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
char * av_get_token(const char **buf, const char *term)
Unescape the given string until a non escaped terminating char, and return the token corresponding to...
static av_const int av_toupper(int c)
Locale-independent conversion of ASCII characters to uppercase.
@ AV_ESCAPE_MODE_BACKSLASH
Use backslash escaping.
Memory handling functions.
AVDictionaryEntry * elems