History

Merge commit '11c5f438ff83da5040e85bfa6299f56b321d32ef'

* commit '11c5f438ff83da5040e85bfa6299f56b321d32ef': dict: Change return type of av_dict_copy()

Hendrik Leppkes committed 11 years ago

Commit b9947882 parents fcfb66b 11c5f434 files · +16 −5Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavutil/dict.c +8 −3
  3. libavutil/dict.h +3 −1
  4. libavutil/version.h +1 −1
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2015-08-28 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182015-10-14 - xxxxxxx - lavu 55.4.100 / lavu 55.2.0 - dict.h
19 Change return type of av_dict_copy() from void to int, so that a proper
20 error code can be reported.
21
182015-09-29 - xxxxxxx - lavc 57.3.100 / lavc 57.2.0 - avcodec.h222015-09-29 - xxxxxxx - lavc 57.3.100 / lavc 57.2.0 - avcodec.h
19 Change type of AVPacket.duration from int to int64_t.23 Change type of AVPacket.duration from int to int64_t.
20 24
libavutil/dict.c+8−3
@@ -210,12 +210,17 @@ void av_dict_free(AVDictionary **pm) · 209 unmodified lines
210 av_freep(pm);210 av_freep(pm);
211}211}
212 212
213void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)213int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
214{214{
215 AVDictionaryEntry *t = NULL;215 AVDictionaryEntry *t = NULL;
216 216
217 while ((t = av_dict_get(src, "", t, AV_DICT_IGNORE_SUFFIX)))217 while ((t = av_dict_get(src, "", t, AV_DICT_IGNORE_SUFFIX))) {
218 av_dict_set(dst, t->key, t->value, flags);218 int ret = av_dict_set(dst, t->key, t->value, flags);
219 if (ret < 0)
220 return ret;
221 }
222
223 return 0;
219}224}
220 225
221int av_dict_get_string(const AVDictionary *m, char **buffer,226int av_dict_get_string(const AVDictionary *m, char **buffer,
libavutil/dict.h+3−1
@@ -162,8 +162,10 @@ int av_dict_parse_string(AVDictionary **pm, const char *str, · 161 unmodified lines
162 * @param src pointer to source AVDictionary struct162 * @param src pointer to source AVDictionary struct
163 * @param flags flags to use when setting entries in *dst163 * @param flags flags to use when setting entries in *dst
164 * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag164 * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
165 * @return 0 on success, negative AVERROR code on failure. If dst was allocated
166 * by this function, callers should free the associated memory.
165 */167 */
166void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);168int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
167 169
168/**170/**
169 * Free all the memory allocated for an AVDictionary struct171 * Free all the memory allocated for an AVDictionary struct
libavutil/version.h+1−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
56 */56 */
57 57
58#define LIBAVUTIL_VERSION_MAJOR 5558#define LIBAVUTIL_VERSION_MAJOR 55
59#define LIBAVUTIL_VERSION_MINOR 359#define LIBAVUTIL_VERSION_MINOR 4
60#define LIBAVUTIL_VERSION_MICRO 10060#define LIBAVUTIL_VERSION_MICRO 100
61 61
62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t