diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-08 17:30:15 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-10 15:15:00 +0100 |
commit | 987170cb9dd036d3372c8feac6074d13d1b84dd2 (patch) | |
tree | e4d443be62fdf1319300a027423c777551a20cd9 /libavutil/dict.c | |
parent | 05c36e0e5fbf0b75dbbbd327ad2f6a62992f9262 (diff) | |
download | ffmpeg-987170cb9dd036d3372c8feac6074d13d1b84dd2.tar.gz |
dict: add av_dict_count()
This adds a function to retrieve the number of entries in a
dictionary and updates the places directly accessing what should
be an opaque struct to use this new function instead.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil/dict.c')
-rw-r--r-- | libavutil/dict.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/dict.c b/libavutil/dict.c index cb5f7b160f..1344613fa9 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -23,6 +23,11 @@ #include "internal.h" #include "mem.h" +int av_dict_count(const AVDictionary *m) +{ + return m ? m->count : 0; +} + AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags) { |