34 char pairs[] = {pair ,
'\0'};
35 char vals[] = {
val,
'\0'};
58 printf(
"Testing av_dict_get_string() and av_dict_parse_string()\n");
83 printf(
"\nTesting av_dict_set()\n");
109 printf(
"\nTesting av_dict_set_int()\n");
124 printf(
"\nTesting av_dict_set() with existing AVDictionaryEntry.key as key\n");
#define AV_DICT_DONT_OVERWRITE
Don't overwrite existing entries.
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_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function...
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values. ...
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
#define AV_DICT_APPEND
If the entry already exists, append to it.
static void test_separators(const AVDictionary *m, const char pair, const char val)
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.
static void print_dict(const AVDictionary *m)
char * av_strdup(const char *s)
Duplicate a string.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
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...
printf("static const uint8_t my_array[100] = {\n")
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key, ignoring the suffix of the found key string.
static double val(void *priv, double ch)