1 /*
2 * copyright (c) 2009 Michael Niedermayer
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
22
24
27 {
30
32 #define GET(entry, mem) ((entry) ? (entry)->mem : "N/A")
33 printf(
"Iterating with av_dict_iterate() yields a different result "
34 "than iterating with av_dict_get() and AV_DICT_IGNORE_SUFFIX "
35 "(prev: %p, key %s; av_dict_iterate() %p, key %s, value %s; "
36 "av_dict_get() %p, key %s, value %s)\n",
40 #undef GET
41 }
43 }
44
46 {
51 }
52
54 {
56 char pairs[] = {pair , '0円'};
57 char vals[] = {
val,
'0円'};
58
61
72 }
73
75 {
79
80 printf(
"Testing av_dict_get_string() and av_dict_parse_string()\n");
104
105 printf(
"\nTesting av_dict_set()\n");
117 printf(
"av_dict_get() does not correctly handle NULL key.\n");
122
128 printf(
"av_dict_set does not correctly handle NULL key\n");
129
134
135
136 //valgrind sensible test
137 printf(
"\nTesting av_dict_set_int()\n");
150
151 //valgrind sensible test
152 printf(
"\nTesting av_dict_set() with existing AVDictionaryEntry.key as key\n");
154 return 1;
157 return 1;
161 return 1;
165
166 return 0;
167 }